Skip to content

Commit 2519567

Browse files
committed
fix(ci): run Node tests without --test-force-exit
--test-force-exit can drop finished tests from the report and still exit 0 (nodejs/node#64833, open; its fix PRs nodejs/node#64857 and #64875 are unmerged). With the flag, 8 of 11 local full-suite runs on Node 26.12 and 24.21 reported up to 47 fewer tests than ran; without it, 11 of 11 reported every test in the same time. Each of the 96 test files exits on its own when run alone without the flag, and the timeout watchdog still bounds a leaked handle.
1 parent 2478739 commit 2519567

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
326326
its own list. The GNOME dictation and package permission tests keep their
327327
scratch under `TMPDIR` too, and the shared app-server tests bind their
328328
sockets inside the `try` that removes them.
329+
- `scripts/ci/run-node-checks.sh` reports every Node test again. It ran
330+
`node --test` with `--test-force-exit`, which can drop finished tests from
331+
the report and still exit 0 (nodejs/node#64833). With the flag, 8 of 11
332+
local runs on Node 24 and 26 reported up to 47 fewer tests than ran. Every
333+
test file now exits on its own, so the flag is gone. Where `timeout` exists,
334+
and CI requires it, the watchdog still ends a run that a leaked handle holds
335+
open.
329336
- The AppShots bare modifier monitor waits for `xinput --version` before it
330337
starts its XInput 2 stream, and reports `permission-denied` when the X
331338
server cannot be reached or has no XInput 2. Before, it judged the stream

‎scripts/ci/run-node-checks.sh‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ run_node_tests() {
3333
# off, so every step that can fail returns its status itself.
3434
node scripts/ci/manage-labels.js --check || return
3535

36-
if node --help | grep -q -- "--test-force-exit"; then
37-
# All assertions must finish, but a leaked worker handle must not hold CI open.
38-
node_test_args+=(--test-force-exit)
39-
fi
36+
# No --test-force-exit: it can drop finished tests from the report and still
37+
# exit 0 (nodejs/node#64833). The timeout watchdog below bounds a leaked
38+
# handle.
4039

4140
# Every *.test.js and every test.js; a git pathspec * also matches /.
4241
while IFS= read -r file; do

0 commit comments

Comments
 (0)