You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(node): same once-read metrics race in two more client_loopback tests #2713
Follow-up to #2682. The same race deflaked there — the test encodes metrics as soon as the client reads the server's reply, but ServeEnd::meter bumps the reject/reset counters only when the spawned serve task ends, after the response is on the wire (crates/node/src/handlers/client/dispatch.rs → outcome.rs) — also exists in:
the_timestamp_gate_precedes_every_signed_refusal (crates/node/tests/client_loopback.rs): reads metrics.encode() once after each refusal and asserts the rejected-total lines.
stream_request_with_skewed_timestamp_resets_without_response (same file): reads the encoded metrics once right after observing the stream reset.
On a loaded runner the client can win that race and see a counter one short. Fix as in #2682: replace the once-read encode + ensure! with the bounded support::wait_for_metric_line poll (10 s deadline, 20 ms sleeps) for the final counter assertion in each test. Test-only; no production code changes.
Activity
test(node): poll the reject counters in the two timestamp-gate loopba…
yigitdot commentedon Oct 28, 2026
Folded into #2716 rather than a separate PR; it closes this issue on merge.