Skip to content

Conversation

@inoway46
Copy link

@inoway46 inoway46 commented Feb 11, 2026

Summary

  • replace stepCommand('restart') with command('restart') in:
    • test/parallel/test-debugger-restart-message.js
    • test/parallel/test-debugger-run-after-quit-restart.js
  • in test-debugger-restart-message, wait for Debugger attached. and prompt before asserting the listening message count
  • in test-debugger-run-after-quit-restart, continue to assert behavior via waitForInitialBreak() and breakInfo

Context

test-macOS has shown intermittent timeouts while waiting for BREAK_MESSAGE in restart-related debugger tests.
In failing logs, reconnect succeeds (Debugger attached. is printed), but the expected break ... in line is not observed before timeout.

Hypothesis

The flake is likely caused by a timing race in CLI output ordering around restart/reconnect:

  • stepCommand() requires BREAK_MESSAGE to appear
  • under some timing conditions (seen on macOS unusual-path runs), attach/prompt output arrives, but break ... in output is delayed or missed by this wait pattern

This change does not claim to prove a single root cause. It may be related to timing behavior in test/common/debugger.js, but this PR only narrows these two tests to a less fragile synchronization path aligned with what each test is actually verifying.

Why this approach

  • keep test intent intact
  • reduce dependence on a brittle BREAK_MESSAGE wait specifically for restart
  • minimize blast radius by changing only the affected tests

Testing

  • out/Release/node test/parallel/test-debugger-restart-message.js
  • out/Release/node test/parallel/test-debugger-run-after-quit-restart.js
  • additional stress checks were run from an unusual-character path with reduced timeout settings

Fixes: #61762

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Feb 11, 2026
@inoway46 inoway46 force-pushed the debugger-flaky-61762 branch 3 times, most recently from 6dd9cf9 to c3b82fc Compare February 11, 2026 09:58
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.74%. Comparing base (04946a7) to head (c3b82fc).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #61773   +/-   ##
=======================================
  Coverage   89.73%   89.74%           
=======================================
  Files         675      675           
  Lines      204648   204648           
  Branches    39330    39323    -7     
=======================================
+ Hits       183651   183652    +1     
- Misses      13282    13293   +11     
+ Partials     7715     7703   -12     

see 44 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@inoway46 inoway46 force-pushed the debugger-flaky-61762 branch from c3b82fc to 87a24df Compare February 12, 2026 01:47
@inoway46 inoway46 force-pushed the debugger-flaky-61762 branch from 87a24df to 58aeec7 Compare February 12, 2026 01:48
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 the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Re-run test in a folder whose name contains unusual chars" test is flaky

2 participants