Repository navigation
test(tier3): start bridge worker-count tests from an idle server - #358
Merged
Merged
Conversation
The bridge_services fixture probes /healthz until the bridge answers. The probe's server worker can still be finishing after urllib has read the response, so under CI load a test could start with one worker already active. test_slow_drip_request_line_and_headers_obey_an_absolute_deadline then counted that worker next to its own connection and failed with 'assert 2 == 1' (seen on PRs #306 and #344). Wait for the bridge's workers to drain before yielding the fixture. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
requested review from
chrisknvidia,
mosheabr and
rmalani-nv
as code owners
November 6, 2026 03:20
rng1995
enabled auto-merge (squash)
November 6, 2026 03:21
This was referenced Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test_slow_drip_request_line_and_headers_obey_an_absolute_deadlinefails intermittently in CI withassert 2 == 1onbridge_server.active_workers. It hit #306 (Python 3.14) and #344 (Python 3.13, job 127575481748), and it is unrelated to either change.Cause
The
bridge_servicesfixture probes/healthzuntil the bridge answers. urllib returns once it has read the response, but the server-side worker thread is still in itsfinallyblock and has not yet decrementedactive_workers. Under xdist and coverage load, a test can start while that probe worker is still counted. The slow-drip test then sees it alongside its own connection and gets 2 workers instead of 1.Fix
Before yielding, the fixture waits for the bridge to go idle with the existing
wait_for_workers(timeout=2). Only the test fixture changes.Evidence
assert 1 == 0; with it, the test passes.tests/test_nvidia_build_bridge.py: 134 passed.🤖 Generated with Claude Code