Skip to content

Commit a62073f

Browse files
committed
Fix xdist_group: Add --dist=loadgroup to pytest commands
The @pytest.mark.xdist_group markers were being ignored because pytest-xdist uses --dist=load by default, which doesn't respect groups. With --dist=loadgroup, tests in the same xdist_group run sequentially on the same worker, preventing telemetry state interference between tests. This is the ROOT CAUSE of the 88 vs 60 events issue - tests were running in parallel across workers instead of sequentially on one worker as intended. Signed-off-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent c558fae commit a62073f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/integration.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
- name: Run e2e tests (excluding daily-only tests)
5858
run: |
5959
# Exclude telemetry E2E tests from PR runs (run daily instead)
60+
# Use --dist=loadgroup to respect @pytest.mark.xdist_group markers
6061
poetry run python -m pytest tests/e2e \
6162
--ignore=tests/e2e/test_telemetry_e2e.py \
62-
-n auto
63+
-n auto --dist=loadgroup

.github/workflows/test-telemetry-only.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,5 @@ jobs:
5353

5454
- name: Run telemetry test only (with xdist auto to mimic real CI)
5555
run: |
56-
poetry run python -m pytest tests/e2e/test_concurrent_telemetry.py::TestE2ETelemetry::test_concurrent_queries_sends_telemetry -n auto -v -s
56+
# Use --dist=loadgroup to respect @pytest.mark.xdist_group markers
57+
poetry run python -m pytest tests/e2e/test_concurrent_telemetry.py::TestE2ETelemetry::test_concurrent_queries_sends_telemetry -n auto --dist=loadgroup -v -s

0 commit comments

Comments
 (0)