Skip to content

Commit 34ef539

Browse files
committed
test(update): stop the launcher-recovery wait from failing a slow CI runner
1 parent 86bc623 commit 34ef539

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

‎tests/update-stop-first.test.ts‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,20 @@ function freePort(): Promise<number> {
2121
}
2222

2323
async function waitForProxy(port: number): Promise<boolean> {
24-
const deadline = Date.now() + 15_000;
24+
// A cold detached proxy takes ~2s locally, but this test runs inside a CI
25+
// batch of twelve files on a shared runner, where the same boot has been
26+
// observed to blow a 15s budget and fail the whole shard. The test's own
27+
// Bun timeout is 60s, so the readiness wait may use most of that: this
28+
// deadline exists to stop a hung proxy, not to assert a boot deadline the
29+
// suite never intended to enforce.
30+
const deadline = Date.now() + 45_000;
2531
while (Date.now() < deadline) {
2632
try {
2733
const response = await fetch(`http://127.0.0.1:${port}/healthz`, {
28-
signal: AbortSignal.timeout(500),
34+
// A loaded runner can exceed 500ms on the very first connection while
35+
// the process is still binding; a short per-probe timeout there reads
36+
// as "not ready" for a proxy that is merely slow to accept.
37+
signal: AbortSignal.timeout(2_000),
2938
});
3039
if (response.ok) return true;
3140
} catch { /* detached proxy is still starting */ }

0 commit comments

Comments
 (0)