Skip to content

Commit 06aba65

Browse files
Merge pull request #1038 from corbitsdev/cl-7959-harden-watchdog-stall-timing
Give the two-attempt watchdog stall test an explicit 10s timeout
2 parents bf1db42 + d3c1cf5 commit 06aba65

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/test-parallel.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ describe("runWithWatchdog", () => {
112112
expect(result.attempts).toBe(1);
113113
});
114114

115+
// Two stall windows (2 x 1.5s) plus kill/retry overhead exceed the
116+
// default 5s timeout when a delayed first tick doubles one attempt
117+
// (tickMs == stallMs with a strict `>` check fires on the second tick).
115118
test("gives up after the final attempt with exit code 1", async () => {
116119
const stalls: [number, number][] = [];
117120
const result = await runWithWatchdog({
@@ -126,7 +129,7 @@ describe("runWithWatchdog", () => {
126129
expect(result.attempts).toBe(2);
127130
// The final stall is reported by the exit code, not a retry notice.
128131
expect(stalls).toEqual([[1, 2]]);
129-
});
132+
}, 10_000);
130133

131134
test("kills the whole process group, including the child's own children", async () => {
132135
const dir = mkdtempSync(join(tmpdir(), "test-parallel-group-"));

0 commit comments

Comments
 (0)