Skip to content

test: avoid initial-break sync in attach-only debugger tests#61937

Open
inoway46 wants to merge 1 commit intonodejs:mainfrom
inoway46:debugger-flaky-61762-attach-sync
Open

test: avoid initial-break sync in attach-only debugger tests#61937
inoway46 wants to merge 1 commit intonodejs:mainfrom
inoway46:debugger-flaky-61762-attach-sync

Conversation

@inoway46
Copy link
Contributor

@inoway46 inoway46 commented Feb 22, 2026

Summary

This PR addresses the same flaky debugger startup race as #61773.

On some macOS CI runs, waitForInitialBreak() can time out even after Debugger attached. and the debug> prompt are observed.
For tests that use waitForInitialBreak() only for startup synchronization (and do not assert initial pause/breakInfo semantics), this PR switches startup sync to attach/prompt-based waiting while keeping test intent unchanged.

Testing

UNUSUAL="$HOME/dir with \$unusual\"chars?'åß∂ƒ©∆¬…\`"
mkdir -p "$UNUSUAL"
ln -sfn "$PWD" "$UNUSUAL/node"
cd "$UNUSUAL/node"
  • ./tools/test.py -p actions parallel/test-debugger-watch-validation (passes locally)
  • ./tools/test.py -p actions parallel/test-debugger-random-port-with-inspect-port (passes locally)
  • ./tools/test.py -p actions parallel/test-debugger-extract-function-name (passes locally)
  • Additional unusual-path stress runs were executed on this PR branch:
    • ./tools/test.py -p actions -j1 --repeat 50 parallel/test-debugger-watch-validation parallel/test-debugger-random-port-with-inspect-port parallel/test-debugger-extract-function-name
    • ./tools/test.py -p actions -j4 --repeat 100 parallel/test-debugger-watch-validation parallel/test-debugger-random-port-with-inspect-port parallel/test-debugger-extract-function-name
  • CI passes on macOS

Refs: #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 22, 2026
@inoway46 inoway46 changed the title test: relax debugger attach sync in tests test: avoid initial-break sync in attach-only debugger tests Feb 22, 2026
@inoway46 inoway46 force-pushed the debugger-flaky-61762-attach-sync branch from 497d1a4 to 67c068f Compare February 28, 2026 11:54
@inoway46 inoway46 marked this pull request as ready for review February 28, 2026 18:02
@codecov
Copy link

codecov bot commented Feb 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.65%. Comparing base (35d3bc8) to head (67c068f).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #61937      +/-   ##
==========================================
- Coverage   89.65%   89.65%   -0.01%     
==========================================
  Files         676      676              
  Lines      206231   206240       +9     
  Branches    39505    39510       +5     
==========================================
+ Hits       184898   184905       +7     
  Misses      13463    13463              
- Partials     7870     7872       +2     

see 34 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.

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.

2 participants