Skip to content

test(gateway): Fix CI flakiness - #73

Merged
csvance merged 1 commit into
mainfrom
fix-flaky-gateway-test
Aug 13, 2026
Merged

test(gateway): Fix CI flakiness #73
csvance merged 1 commit into
mainfrom
fix-flaky-gateway-test

Conversation

@csvance

@csvance csvance commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

…eadiness

CI flaked with the gateway never discovering worker0's models: routing to
only0 returned NOT_FOUND, round-robin saw only worker1, and the SHM
fan-out to worker0 hit DEADLINE_EXCEEDED. The mocks started asynchronously
(start! is non-blocking) on close-then-rebind free ports, and the gateway
runs its first synchronous discovery as soon as serve_gateway returns, so
on a slow CI runner the first probe could hit a half-started mock, after
which calls to that worker hung for the rest of the test.

The mocks now bind OS-assigned ephemeral ports (no free-port race) and the
start helper blocks until a ServerReady round trip succeeds, so the
gateway's first discovery always probes a live, warm worker. The readiness
poll also pre-compiles the mock's handler paths, removing the
cold-first-request stall. Verified 6/6 standalone runs of test_gateway.jl
and a full 711/711 gateway suite.
@csvance
csvance merged commit 4394c7f into main Aug 13, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant