Skip to content

Commit 3b38bcc

Browse files
authored
Update to use parallel testing (#395)
1 parent 9bf23e4 commit 3b38bcc

File tree

7 files changed

+40
-5
lines changed

7 files changed

+40
-5
lines changed

js/src/tests/run_trees.int.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ async function toArray<T>(iterable: AsyncIterable<T>): Promise<T[]> {
99
return result;
1010
}
1111

12-
test("Test post and patch run", async () => {
12+
test.concurrent("Test post and patch run", async () => {
1313
const projectName = `__test_run_tree`;
1414
const langchainClient = new Client({});
1515
const projects = await toArray(langchainClient.listProjects());

python/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ tests_watch:
77
poetry run ptw --now . -- -vv -x tests/unit_tests
88

99
integration_tests:
10-
poetry run pytest tests/integration_tests
10+
poetry run pytest -n auto tests/integration_tests
1111

1212
lint:
1313
poetry run ruff .

python/langsmith/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,8 @@ def _run_transform(
812812
run_create["inputs"] = _hide_inputs(run_create["inputs"])
813813
if "outputs" in run_create:
814814
run_create["outputs"] = _hide_outputs(run_create["outputs"])
815+
if not run_create.get("start_time"):
816+
run_create["start_time"] = datetime.datetime.utcnow()
815817
return run_create
816818

817819
@staticmethod

python/poetry.lock

Lines changed: 35 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ psutil = "^5.9.5"
4646
freezegun = "^1.2.2"
4747
pytest-subtests = "^0.11.0"
4848
pytest-watcher = "^0.3.4"
49+
pytest-xdist = "^3.5.0"
4950

5051
[tool.poetry.group.lint.dependencies]
5152
openai = "^1.10"

python/tests/integration_tests/test_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ def test_persist_update_run(
147147
inputs={"text": "hello world"},
148148
project_name=project_name,
149149
api_url=os.getenv("LANGCHAIN_ENDPOINT"),
150-
execution_order=1,
151150
start_time=start_time,
152151
extra={"extra": "extra"},
153152
revision_id=revision_id,

python/tests/integration_tests/test_runs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ async def my_chain_run(text: str):
132132
runs_dict = {run.name: run for run in runs}
133133
assert runs_dict["my_chain_run"].parent_run_id is None
134134
assert runs_dict["my_chain_run"].run_type == "chain"
135-
assert runs_dict["my_chain_run"].execution_order == 1
136135
assert runs_dict["my_run"].parent_run_id == runs_dict["my_chain_run"].id
137136
assert runs_dict["my_run"].run_type == "chain"
138137
assert runs_dict["my_llm_run"].parent_run_id == runs_dict["my_run"].id

0 commit comments

Comments
 (0)