Skip to content

test: add graceful handling of test-debugger-pid flakes#62472

Open
jasnell wants to merge 1 commit intonodejs:mainfrom
jasnell:jasnell/flaky-test-debugger-pid
Open

test: add graceful handling of test-debugger-pid flakes#62472
jasnell wants to merge 1 commit intonodejs:mainfrom
jasnell:jasnell/flaky-test-debugger-pid

Conversation

@jasnell
Copy link
Copy Markdown
Member

@jasnell jasnell commented Mar 28, 2026

The test-debugger-pid test has been flaky in CI. The apparent cause is that the test appears to hang if some other test happens to leave something stuck running on port 9229. This change adds a check to see if the port is available before attempting to test and skips if the port is in use. It also adds more graceful
timeout handling to the test.

Admittedly, this is a band-aid for the underlying issue, which appears to be that some other test is not cleaning up properly. We don't know which test that is, so for now let's try to handle the symptom gracefully.

Whether this is the way we want to handle this flake is an open question.

Reliability-report: https://github.com/nodejs/reliability/blob/main/reports/2026-03-28.md
Signed-off-by: James M Snell jasnell@gmail.com
Assisted-by: Opencode/Opus 4.6

The test-debugger-pid test has been flaky in CI. The
apparent cause is that the test appears to hang if
some other test happens to leave something stuck running
on port 9229. This change adds a check to see if the
port is available before attempting to test and skips
if the port is in use. It also adds more graceful
timeout handling to the test.

Admittedly, this is a band-aid for the underlying issue,
which appears to be that some other test is not cleaning
up properly. We don't know which test that is, so for
now let's try to handle the symptom gracefully.

Reliability-report: https://github.com/nodejs/reliability/blob/main/reports/2026-03-28.md
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode/Opus 4.6
@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 Mar 28, 2026
@jasnell jasnell added flaky-test Issues and PRs related to the tests with unstable failures on the CI. and removed needs-ci PRs that need a full CI run. labels Mar 28, 2026
@lpinca
Copy link
Copy Markdown
Member

lpinca commented Mar 28, 2026

Whether this is the way we want to handle this flake is an open question.

I will not block but no, that's not how I would handle it. Applying a buffer solution to tests defeats their purpose.

@jasnell
Copy link
Copy Markdown
Member Author

jasnell commented Mar 28, 2026

Yep, understood. I'm not too sold on this approach either. Hmmm...

@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.71%. Comparing base (e78ccd8) to head (cdc5726).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #62472   +/-   ##
=======================================
  Coverage   89.70%   89.71%           
=======================================
  Files         691      691           
  Lines      213935   213935           
  Branches    41050    41047    -3     
=======================================
+ Hits       191907   191923   +16     
- Misses      14095    14106   +11     
+ Partials     7933     7906   -27     

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

flaky-test Issues and PRs related to the tests with unstable failures on the CI. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants