Commit 091946d
test(setup): arm a 120s watchdog to turn exit-hangs into fast failures (#9056)
A `before` hook that throws after starting the tracer leaves the RC socket and
background timers running. Mocha (run without --exit) never drains the event
loop, and the job silently hits the 45-minute job timeout rather than reporting
the real error. The watchdog times out 120 s after all suites complete, logs the
active handles, and exits non-zero so the error surfaces immediately. It is
unref'd so a clean run always exits before the timer fires.
The 120 s window is 4× the longest observed test timeout (30 s) and is measured
from the end of all teardown, so no legitimate per-suite after hook races it.1 parent 247bbb3 commit 091946d
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
416 | 422 | | |
417 | 423 | | |
418 | 424 | | |
| |||
421 | 427 | | |
422 | 428 | | |
423 | 429 | | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
424 | 444 | | |
425 | 445 | | |
426 | 446 | | |
| |||
0 commit comments