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
test(server-auth): stop three tests from racing the runner instead of the clock
Three separate causes behind the windows-latest failures in this file,
each of which reads as the same flake from the summary line.
Two tests still built a fresh startPoolRetryHarness per case inside a
loop — five and six of them. Each one wipes and recreates TEST_DIR,
binds a server, and redirects global fetch, which does not fit Bun's 5s
default on a Windows runner. Worse, the request still in flight when the
budget expired raced the next test through that same global fetch, which
is how an unrelated test failed at 412ms in an earlier run. Both now use
one harness with a body cursor, the shape already applied to their
sibling, and each case still proves its own original 400 and exactly one
acct-pool-a dispatch.
WS-REBIND-01 was not a budget overrun at all. It failed at 748ms because
it carries its own 1s deadline for a two-hop WebSocket retry that stops
and restarts a real server. An internal deadline dying faster than the
test budget is exactly what made this look random. That 1s becomes 15s
and the test gets an explicit 30s budget.
The harness also never reset the WebSocket registry, which is
process-global and survives teardown, while WS-REBIND-01 asserts exact
per-account socket counts. Five kinds of state were cleared and this one
was not. Reset it with the rest — defensive here rather than a
reproduced failure, and labelled as such.
Ablated: no-oping updateCodexWebSocketAuthContext fails WS-REBIND-01, so
the added headroom did not hollow out the migration proof.
0 commit comments