Skip to content

test: fix flaky debugger test #58324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

islandryu
Copy link
Contributor

@islandryu islandryu commented May 14, 2025

For some reason, I’ve lost Jenkins permissions and can’t post the detailed URL, but I’m modifying the contents of this CI:
https://ci.nodejs.org/job/node-test-commit/79774/

I encountered this on my Windows machine when running this command.

 python3 tools/test.py --repeat=10000 parallel/test-debugger-break

await cli.stepCommand('next');
assert.ok(
cli.output.includes(`step in ${script}:3`),
'pauses in next line of the script');
assert.match(
cli.output,
/> 3 name = 'Robin';/,
'marks the 3nd line');

The cause was the output of the cont command.
Normally, it looks like this

< Hello Robin
< 
break in test/fixtures/debugger/break.js:10
  8 }
  9 sayHello();
>10 debugger;
 11 setTimeout(sayHello, 10);
 12 
debug> 

However, on rare occasions, the order of the debugger output and standard output is reversed like this:

break in test/fixtures/debugger/break.js:10
  8 }
  9 sayHello();
>10 debugger;
 11 setTimeout(sayHello, 10);
 12 
debug> 
< Hello Robin
< 
debug> 

So I modified it to wait for the corresponding response before proceeding to the next command.

@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 14, 2025
Copy link

codecov bot commented May 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.24%. Comparing base (a822a1c) to head (9a420b5).
Report is 39 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58324      +/-   ##
==========================================
+ Coverage   90.17%   90.24%   +0.07%     
==========================================
  Files         631      633       +2     
  Lines      186652   186818     +166     
  Branches    36660    36672      +12     
==========================================
+ Hits       168312   168594     +282     
+ Misses      11121    11029      -92     
+ Partials     7219     7195      -24     

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

@ShogunPanda ShogunPanda added the request-ci Add this label to start a Jenkins CI on a PR. label May 15, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 15, 2025
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

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.

5 participants