Skip to content

test: deflake watch mode test for missing env file - #67041

Open
fzakaria wants to merge 1 commit into
nodejs:mainfrom
fzakaria:test-watch-mode-env-file
Open

fzakaria wants to merge 1 commit into
nodejs:mainfrom
fzakaria:test-watch-mode-env-file

Conversation

@fzakaria

@fzakaria fzakaria commented Oct 27, 2026 •

Copy link
Copy Markdown

The subtest watched all of tmpdir, so files created there by the subtests running alongside it restarted the child and broke its output. The fix is to watch a directory of its own instead to not conflict.

Similar to: #66232

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure. labels Oct 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Welcome to Node.js, and thank you for your first contribution!

Before review, please take a moment to read:

Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal.

The subtest watched all of tmpdir, so files created there by the
subtests running alongside it restarted the child and broke its
output. The fix is to watch a directory of its own instead to not
conflict.

Refs: nodejs#66232
Assisted-by: Claude
Signed-off-by: Farid Zakaria <[email protected]>
@fzakaria
fzakaria force-pushed the test-watch-mode-env-file branch from ec3da27 to 6a0265a Compare October 27, 2026 00:36
@fzakaria

Copy link
Copy Markdown
Author

Context: I found the race behind this by running the test under Rewind VM
(https://rewindvm.dev/), a deterministic single-vCPU KVM VM I am stress testing.

fzakaria added a commit to fzakaria/rewindvm that referenced this pull request Oct 27, 2026
Rewind found test-watch-mode's --env-file-if-exists subtest failing in
34 of 514 runs: it watched the shared tmpdir, so files the subtests
running beside it created restarted its child. The fix is
nodejs/node#67041. List Node after Go, keeping the best known projects
first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants