Repository navigation
test(grpc-js): stabilize weighted round robin tests on slow runners - #3104
Merged
murgatroid99 merged 1 commit intoOct 1, 2026
Merged
Conversation
In test-weighted-round-robin, test traffic was issued immediately against freshly
created clients with aggressive 100ms per-call deadlines. On slower or heavily
loaded CI environments (such as Windows Kokoro runners), cold-start connection
establishment, name resolution, and picker readiness frequently exceeded 100ms,
triggering intermittent DEADLINE_EXCEEDED ("Waiting for LB pick") failures.
Additionally, blind initial traffic could reach only the first backend before
the second finished connecting, leaving the second backend's metrics unrecorded.
Furthermore, executing 50 sequential RPC round-trips combined with arbitrary
sleep timers pushed total execution time beyond Mocha's default 2-second timeout
on Windows VMs (often failing at ~2.005s).
This change stabilizes the tests by:
1. Ensuring the channel reaches readiness and that both backends have responded
to initial traffic before measurement begins, guaranteeing that connections
and initial metric tracking are established across all endpoints.
2. Synchronizing deterministically against picker updates rather than relying on
fixed sleep delays, and executing measurement RPCs concurrently over HTTP/2
so the suite runs in ~1s while preserving the expected weight distribution.
3. Increasing the test timeout to provide sufficient headroom against VM
scheduling jitter on Windows CI.
olavloite
force-pushed
the
wait-for-channel-readiness-in-tests
branch
from
October 1, 2026 10:58
9e1e2f3 to
2675479
Compare
murgatroid99
approved these changes
Oct 1, 2026
murgatroid99
pushed a commit
that referenced
this pull request
Oct 7, 2026
…3104) In test-weighted-round-robin, test traffic was issued immediately against freshly created clients with aggressive 100ms per-call deadlines. On slower or heavily loaded CI environments (such as Windows Kokoro runners), cold-start connection establishment, name resolution, and picker readiness frequently exceeded 100ms, triggering intermittent DEADLINE_EXCEEDED ("Waiting for LB pick") failures. Additionally, blind initial traffic could reach only the first backend before the second finished connecting, leaving the second backend's metrics unrecorded. Furthermore, executing 50 sequential RPC round-trips combined with arbitrary sleep timers pushed total execution time beyond Mocha's default 2-second timeout on Windows VMs (often failing at ~2.005s). This change stabilizes the tests by: 1. Ensuring the channel reaches readiness and that both backends have responded to initial traffic before measurement begins, guaranteeing that connections and initial metric tracking are established across all endpoints. 2. Synchronizing deterministically against picker updates rather than relying on fixed sleep delays, and executing measurement RPCs concurrently over HTTP/2 so the suite runs in ~1s while preserving the expected weight distribution. 3. Increasing the test timeout to provide sufficient headroom against VM scheduling jitter on Windows CI.
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.
In test-weighted-round-robin, test traffic was issued immediately against freshly
created clients with aggressive 100ms per-call deadlines. On slower or heavily
loaded CI environments (such as Windows Kokoro runners), cold-start connection
establishment, name resolution, and picker readiness frequently exceeded 100ms,
triggering intermittent DEADLINE_EXCEEDED ("Waiting for LB pick") failures.
Additionally, blind initial traffic could reach only the first backend before
the second finished connecting, leaving the second backend's metrics unrecorded.
Furthermore, executing 50 sequential RPC round-trips combined with arbitrary
sleep timers pushed total execution time beyond Mocha's default 2-second timeout
on Windows VMs (often failing at ~2.005s).
This change stabilizes the tests by:
to initial traffic before measurement begins, guaranteeing that connections
and initial metric tracking are established across all endpoints.
fixed sleep delays, and executing measurement RPCs concurrently over HTTP/2
so the suite runs in ~1s while preserving the expected weight distribution.
scheduling jitter on Windows CI.