File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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-" ) ) ;
You can’t perform that action at this time.
0 commit comments