Skip to content

test: avoid restart in debugger exceptions test#63606

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:test-debugger-exceptions
Open

test: avoid restart in debugger exceptions test#63606
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:test-debugger-exceptions

Conversation

@trivikr
Copy link
Copy Markdown
Member

@trivikr trivikr commented May 28, 2026

Fixes a flaky sync point in test-debugger-exceptions.

The test restarted the debugger after setting breakOnNone, then waited for the
initial break again. The restart is not needed for the assertion being made and
can intermittently time out while waiting for the break message.

Instead, the test now sets breakOnNone while already paused on the uncaught
exception, continues execution, and verifies that the debugger disconnects.

Refs:

Error log
Path: parallel/test-debugger-exceptions
Error: --- stderr ---
/Users/runner/work/node/node/node/test/common/debugger.js:92
        const timeoutErr = new Error(`Timeout (${TIMEOUT}) while waiting for ${pattern}`);
                           ^

Error: Timeout (15000) while waiting for /break (?:on start )?in/i
    at /Users/runner/work/node/node/node/test/common/debugger.js:92:28
    at new Promise (<anonymous>)
    at Object.waitFor (/Users/runner/work/node/node/node/test/common/debugger.js:67:14)
    at Object.waitForInitialBreak (/Users/runner/work/node/node/node/test/common/debugger.js:116:18)
    at /Users/runner/work/node/node/node/test/parallel/test-debugger-exceptions.js:55:17
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5) {
  output: '< Debugger ending on ws://127.0.0.1:55106/bd3b1054-e004-4647-befb-bbcded26c129\n' +
    '< For help, see: [https://nodejs.org/learn/getting-started/debugging\n](https://nodejs.org/learn/getting-started/debugging/n)' +
    '< \n' +
    'debug> \n' +
    '< Debugger listening on ws://127.0.0.1:55109/38edde6c-fc97-464e-8e96-27cdb85f5cef\n' +
    '< For help, see: [https://nodejs.org/learn/getting-started/debugging\n](https://nodejs.org/learn/getting-started/debugging/n)' +
    '< \n' +
    'debug> connecting to 127.0.0.1:55109 ...\n' +
    '< Debugger attached.\n' +
    '< \n' +
    'debug>  ok\n' +
    'debug> '
}

Assisted-by: openai:gpt-5.5

The final restart is not needed to verify breakOnNone. The test is
already paused on the uncaught exception, so continue from there and
assert that the debugger disconnects.

Refs: https://github.com/nodejs/node/actions/runs/26533911441/job/78157541700

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
@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 May 28, 2026
@trivikr trivikr added flaky-test Issues and PRs related to the tests with unstable failures on the CI. request-ci Add this label to start a Jenkins CI on a PR. labels May 28, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.32%. Comparing base (4639dcb) to head (7da672d).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #63606      +/-   ##
==========================================
+ Coverage   90.29%   90.32%   +0.02%     
==========================================
  Files         730      730              
  Lines      234695   234695              
  Branches    43956    43961       +5     
==========================================
+ Hits       211927   211984      +57     
+ Misses      14494    14421      -73     
- Partials     8274     8290      +16     

see 47 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

flaky-test Issues and PRs related to the tests with unstable failures on the CI. needs-ci PRs that need a full CI run. request-ci Add this label to start a Jenkins CI on a PR. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants