Repository navigation
test: reduce watch mode restart flakiness - #63390
Merged
nodejs-github-bot merged 1 commit intoMay 24, 2026
Merged
nodejs-github-bot merged 1 commit into
nodejs-github-bot merged 1 commit into
Conversation
Start waiting for each watch restart before writing the file, then wait for a platform-scaled settling period before mutating it again. This gives watch mode time to process filesystem events and dependency reporting from the child process on slower CI machines. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: openai:gpt-5.5
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #63390 +/- ##
==========================================
- Coverage 90.06% 90.04% -0.02%
==========================================
Files 714 714
Lines 225648 225648
Branches 42711 42698 -13
==========================================
- Hits 203237 203192 -45
- Misses 14200 14257 +57
+ Partials 8211 8199 -12 🚀 New features to boost your workflow:
|
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
aduh95
reviewed
May 20, 2026
Comment on lines
+116
to
+118
| const failedRestart = restart(common.platformTimeout(10_000)); | ||
| writeFileSync(file, syntaxErrorContent); | ||
|
|
||
| await sleep(common.platformTimeout(1000)); |
Fixes intermittent failures in
test-watch-mode-restart-esm-loading-error.mjs.The test now starts waiting for the watch restart before writing the file and
waits for a platform-scaled settling period before the next mutation. This
reduces races with filesystem watch event delivery and dependency reporting
from the watched child process on slower CI machines.
Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-05-16.md#jstest-failure
Assisted-by: openai:gpt-5.5