Speed up tests

This commit is contained in:
Nuno Campos
2024-12-04 15:29:51 -08:00
parent dcc2617396
commit 771b9b28cd
4 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ jobs:
env:
LANGGRAPH_FF_SEND_V2: ${{ matrix.ff-send-v2 }}
run: |
make test
make test_parallel
- name: Ensure the tests did not create any additional files
shell: bash
+6
View File
@@ -48,6 +48,12 @@ test:
make stop-postgres; \
exit $$EXIT_CODE
test_parallel:
make start-postgres && poetry run pytest -n auto --dist worksteal $(TEST); \
EXIT_CODE=$$?; \
make stop-postgres; \
exit $$EXIT_CODE
WORKERS ?= auto
XDIST_ARGS := $(if $(WORKERS),-n $(WORKERS) --dist worksteal,)
MAXFAIL ?=
-1
View File
@@ -1969,7 +1969,6 @@ def test_send_sequences() -> None:
)
@pytest.mark.repeat(20)
@pytest.mark.parametrize("checkpointer_name", ALL_CHECKPOINTERS_SYNC)
def test_send_dedupe_on_resume(
request: pytest.FixtureRequest, checkpointer_name: str
@@ -847,7 +847,6 @@ async def test_node_not_cancelled_on_other_node_interrupted(
assert awhiles == 1
@pytest.mark.repeat(10)
async def test_step_timeout_on_stream_hang() -> None:
inner_task_cancelled = False
@@ -2559,7 +2558,6 @@ async def test_concurrent_emit_sends() -> None:
)
@pytest.mark.repeat(10)
@pytest.mark.parametrize("checkpointer_name", ALL_CHECKPOINTERS_ASYNC)
async def test_send_sequences(checkpointer_name: str) -> None:
class Node:
@@ -2649,7 +2647,6 @@ async def test_send_sequences(checkpointer_name: str) -> None:
]
@pytest.mark.repeat(20)
@pytest.mark.parametrize("checkpointer_name", ALL_CHECKPOINTERS_ASYNC)
async def test_send_dedupe_on_resume(checkpointer_name: str) -> None:
if not FF_SEND_V2: