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
Commit 7b1b4ce
Browse filesBrowse the repository at this point in the historyBrowse files
fix(service): give a Windows cold start room to bind, without loosening zero budget
Reimplements #3039 (author @ntdatt812), whose diagnosis and production logic
are both right.
confirmServiceServing had a fixed 20s deadline and returned as soon as the
clock passed it. A Windows cold start does NTFS ACL hardening and previous-
session journal recovery before the listener exists, so #3009 recorded a
service that bound a few seconds late and then stayed healthy -- reported as a
terminal failure with exit 1. The caller's fallback is to start a second proxy
against a port that is about to be taken, which is worse than waiting.
Windows now gets 45s, every other platform keeps 20s, and the loop knocks once
more after a short grace before calling it dead.
Two changes to #3039 as submitted:
- It relaxed `expect(probes).toBe(1)` to `toBeGreaterThanOrEqual(1)` in the
zero-budget test. That assertion is what stops a future change from sleeping
when the caller asked not to wait, and "at least one" passes against exactly
the version it is meant to forbid. The `waited` guard already preserves the
contract, so the original assertion is restored and the comment says why.
- Its Windows-budget test asserted only `toBeGreaterThan(linux)`, which accepts
21s. The reported service bound past 20s, so the number is the contract: the
test now pins 45_000 absolutely.
Mutation-checked, both restored afterwards:
remove the `waited` guard -> 181 pass / 1 fail, the zero-budget test
remove the grace probe -> 181 pass / 1 fail, the #3009 test
Closes#3009.
0 commit comments