FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: fix flaky HTTP/2 reset callback check by trivikr · Pull Request #64730 · nodejs/node · GitHub

/ node Public

test: fix flaky HTTP/2 reset callback check - #64730

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
trivikr:test-http2-reset-happy-close
Aug 1, 2026
Merged

test: fix flaky HTTP/2 reset callback check#64730
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
trivikr:test-http2-reset-happy-close

Conversation

trivikr commented Jul 25, 2026

Copy link
Copy Markdown
Member

Refs: https://github.com/nodejs/reliability/issues?q=sort%3Aupdated-desc%20test-http2-reset-happy-close

The test previously expected all pending write callbacks to run within two
setImmediate() turns after the HTTP/2 stream emitted 'close'. Write
callbacks can run later when data has already been handed to the socket,
making that timing assumption unreliable under CI load.

Track stream closure and write callback completion independently, and close
the server only after both conditions are satisfied. Use common.mustCall()
to continue verifying that all 16 callbacks run. If a callback is genuinely
lost, the test harness will time out or report the callback count mismatch.


Assisted-by: codex:gpt-5.6-sol

The test assumed that all pending write callbacks would run within two
event loop iterations after the stream closed. Callbacks for writes
already handed to the socket can run later, causing a flaky assertion.

Wait for the stream to close and all expected write callbacks to run
before closing the server.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Jul 25, 2026

trivikr commented Jul 25, 2026
edited
Loading

Copy link
Copy Markdown
Member Author

trivikr marked this pull request as ready for review July 25, 2026 21:39
trivikr added the flaky-test Issues and PRs related to the tests with unstable failures on the CI. label Jul 25, 2026

codecov Bot commented Jul 25, 2026
edited
Loading

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.14%. Comparing base (9024119) to head (b8b5d04).
⚠️ Report is 83 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64730      +/-   ##
==========================================
- Coverage   90.15%   90.14%   -0.01%     
==========================================
  Files         743      743              
  Lines      242407   242407              
  Branches    45645    45659      +14     
==========================================
- Hits       218532   218527       -5     
- Misses      15357    15384      +27     
+ Partials     8518     8496      -22     

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

trivikr added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 26, 2026

inoway46 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM. I specifically checked the removal of the explicit writeCbCount assertion: common.mustCall(..., N_WRITES) and the maybeCloseServer() gate preserve the exact-count invariant, so this removes the timing assumption without weakening the test coverage.

github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 27, 2026

This comment was marked as outdated.

Copy link
Copy Markdown
Collaborator

trivikr added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. commit-queue Add this label to land a pull request using GitHub Actions. labels Jul 28, 2026
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 1, 2026
nodejs-github-bot merged commit a4aa3c0 into nodejs:main Aug 1, 2026
108 checks passed

Copy link
Copy Markdown
Collaborator

Landed in a4aa3c0

aduh95 added dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. dont-land-on-v26.x PRs that should not land on the v26.x-staging branch and should not be released in v26.x. labels Aug 3, 2026

aduh95 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

#63249 was marked semver-major, so adding dont-land labels here

trivikr deleted the test-http2-reset-happy-close branch August 16, 2026 16:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. dont-land-on-v26.x PRs that should not land on the v26.x-staging branch and should not be released in v26.x. flaky-test Issues and PRs related to the tests with unstable failures on the CI. 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


Back | FazBrowse Home | New Git URL