Skip to content

Commit 286a1e5

Browse files
committed
test(cursor): give the discovery retry test a CI-proof timeout budget
The 120ms budget applied to BOTH attempts (retry cap is min-ed with it); on a loaded runner the succeeding second attempt also timed out. 1s keeps the test deterministic without materially slowing the suite.
1 parent abd2f31 commit 286a1e5

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎tests/cursor-hardening.test.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,12 @@ describe("Cursor discovery bounded retry", () => {
413413
}
414414
stream.respond({ ":status": 200, "content-type": "application/proto" });
415415
stream.end(body);
416-
}, baseUrl => fetchCursorUsableModels({ apiKey: "test-token", baseUrl, timeoutMs: 120 }));
416+
// 120ms was enough on a quiet machine but the retry attempt shares the
417+
// same budget (min(timeoutMs, retry cap)) and flaked on loaded CI
418+
// runners: the second, succeeding attempt also timed out. 1s keeps the
419+
// test deterministic; the never-responding first attempt still bounds
420+
// total runtime at ~1.5s.
421+
}, baseUrl => fetchCursorUsableModels({ apiKey: "test-token", baseUrl, timeoutMs: 1_000 }));
417422

418423
expect(requests).toBe(2);
419424
expect(result).toEqual({ ok: true, models: ["gpt-5.5-high"] });

0 commit comments

Comments
 (0)