Skip to content

test: pin proxy fixture to a single worker/acceptor to deflake Windows CI - #2188

Merged
vdusek merged 1 commit into
masterfrom
fix/proxy-fixture-num-workers
Aug 25, 2026
Merged

test: pin proxy fixture to a single worker/acceptor to deflake Windows CI#2188
vdusek merged 1 commit into
masterfrom
fix/proxy-fixture-num-workers

Conversation

@vdusek

@vdusek vdusek commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Fixes flaky test_proxy_kwarg_works_against_a_real_proxy on Windows CI (run 32528651226): an xdist worker crashed ("node down: Not properly terminated") while starting the real local proxy.

Root cause: the proxy/disabled_proxy fixtures start proxy.py's Proxy(...) without --num-workers/--num-acceptors, so it defaults both to multiprocessing.cpu_count() — spawning ~8 extra OS processes (confirmed empirically) for a single-test proxy. Under xdist's own parallel workers on a resource-constrained Windows runner, this process-spawn amplification crashed a worker. proxy.py's own test harness (proxy/testing/test_case.py) pins --num-workers 1 --num-acceptors 1 for exactly this reason.

Fix: add the same flags to both fixtures, cutting the fixture's spawned processes from ~8 to 1.

Verified 40/40 clean runs of the affected test modules under -n auto after the fix (previously confirmed 8 child processes spawned per fixture use before the fix vs. 1 after).

✍️ Drafted by Claude Code

@vdusek vdusek added t-tooling Issues with this label are in the ownership of the tooling team. adhoc Ad-hoc unplanned task added during the sprint. labels Aug 24, 2026
@vdusek vdusek self-assigned this Aug 24, 2026
@github-actions github-actions Bot added this to the 148th sprint - Tooling team milestone Aug 24, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label Aug 24, 2026
@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.73%. Comparing base (b4c59c6) to head (249a8ce).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2188   +/-   ##
=======================================
  Coverage   93.72%   93.73%           
=======================================
  Files         181      181           
  Lines       12825    12825           
=======================================
+ Hits        12020    12021    +1     
+ Misses        805      804    -1     
Flag Coverage Δ
unit 93.73% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek
vdusek requested a review from Pijukatel August 24, 2026 12:29
@vdusek
vdusek marked this pull request as ready for review August 24, 2026 12:29
@vdusek
vdusek merged commit 3332897 into master Aug 25, 2026
36 checks passed
@vdusek
vdusek deleted the fix/proxy-fixture-num-workers branch August 25, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants