Commit a5e2fd9
committed
test(sync): wait for SIGINT listener registration in listener-baseline test
Same flake class as the SIGHUP fix — "returns SIGINT/SIGTERM listener
counts to their baseline after shutdown" (line 943) surfaced on Node 22
CI once the earlier SIGHUP flake was fixed. Under worker contention the
fixed-50 flushWatchSetup() rounds occasionally return before
watchAndSync reaches its process.on('SIGINT', ...) call, producing
"Expected: 1, Received: 0" at the listenerCount assertion.
Apply the same bounded wait-until-registered loop in both halves of the
test (firstRun and secondRun) so failures remain loud but timing-robust.1 parent e6c77c8 commit a5e2fd9
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
956 | 963 | | |
957 | 964 | | |
958 | 965 | | |
| |||
965 | 972 | | |
966 | 973 | | |
967 | 974 | | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
968 | 978 | | |
969 | 979 | | |
970 | 980 | | |
| |||
0 commit comments