Skip to content

test: reduce waitForInitialBreak() flakiness in debugger tests#61937

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

test: reduce waitForInitialBreak() flakiness in 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

This fixes flakiness around waitForInitialBreak() in debugger tests.

waitForInitialBreak() can be flaky during startup because the CLI may already attach and print debug> before the initial break ... in output arrives. In some CI runs, tests end up waiting on that break message while startup output is still racing.

This change takes two approaches:

  • Tests that do not depend on waitForInitialBreak() no longer use it.
  • Tests that still need waitForInitialBreak() now wait for debug> first. This synchronizes with the CLI becoming interactive and reduces the startup race before waiting for the initial break.
CI failed logs on main branch (Nov 27, 2025 ~ Mar 8, 2026)

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.

@inoway46 inoway46 marked this pull request as draft March 6, 2026 01:52
@inoway46

This comment was marked as resolved.

@inoway46 inoway46 force-pushed the debugger-flaky-61762-attach-sync branch 2 times, most recently from a7a76cf to ead6d72 Compare March 7, 2026 15:26
@inoway46 inoway46 changed the title test: avoid initial-break sync in attach-only debugger tests test: reduce waitForInitialBreak() flakiness in debugger tests Mar 7, 2026
@inoway46 inoway46 force-pushed the debugger-flaky-61762-attach-sync branch from ead6d72 to 6e208f5 Compare March 7, 2026 15:46
@inoway46 inoway46 marked this pull request as ready for review March 7, 2026 15:48
@inoway46 inoway46 force-pushed the debugger-flaky-61762-attach-sync branch from 6e208f5 to e75e571 Compare March 7, 2026 16:22
@inoway46 inoway46 force-pushed the debugger-flaky-61762-attach-sync branch from e75e571 to e605443 Compare March 7, 2026 16:27
@inoway46 inoway46 marked this pull request as draft March 7, 2026 17:22
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