Skip to content

test: make http2 close-while-writing single-shot - #63388

Closed
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:flaky-test-http2-close-while-writing
Closed

test: make http2 close-while-writing single-shot#63388
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:flaky-test-http2-close-while-writing

Conversation

@trivikr

Copy link
Copy Markdown
Member

This makes test-http2-close-while-writing handle only the first server-side
request data chunk.

The test only needs one chunk to exercise the regression path: the server queues
a write, then the client stream is destroyed on the next tick. Keeping the data
listener active can queue multiple writes and schedule multiple destroys for the
same request body, which makes the test occasionally hang until the harness
timeout.

Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-05-17.md#jstest-failure


Assisted-by: openai:gpt-5.5

The test only needs one request data chunk to queue the server write
and destroy the client stream. Using a persistent data listener can
queue multiple writes and multiple destroys from the same request body,
which makes the test occasionally hang until the harness timeout.
Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: openai:gpt-5.5
@nodejs-github-botnodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels May 17, 2026
@codecov

codecovBot commented May 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.05%. Comparing base (a9b0a83) to head (06dd2a9).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #63388 +/- ##
==========================================
- Coverage 90.06% 90.05% -0.01% 
==========================================
Files 714 714 Lines 225629 225648 +19 Branches 42702 42697 -5 ==========================================
+ Hits 203211 203215 +4 + Misses 14232 14219 -13 - Partials 8186 8214 +28 

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

@trivikrtrivikr added the request-ci Add this label to start a Jenkins CI on a PR. label May 17, 2026
@aduh95

Copy link
Copy Markdown
Contributor

Keeping the data
listener active can queue multiple writes and schedule multiple destroys for the
same request body, which makes the test occasionally hang until the harness
timeout.

I don't really follow the logic, how scheduling multiple destroy would result in a hang? That sounds like a bug

@lpincalpinca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@trivikr

Copy link
Copy Markdown
MemberAuthor

You're right. I should have searched for test-http2-close-while-writing before attempting this PR which would have helped me discover prior attempts. I've been following that in my latest 5 PRs.

@trivikrtrivikr closed this May 19, 2026
@trivikr
trivikr deleted the flaky-test-http2-close-while-writing branch May 19, 2026 19:23
@trivikr

Copy link
Copy Markdown
MemberAuthor

I've posted a bugfix attempt in https://www.github.com/nodejs/node/pull/63439, and will request review after GitHub CI is successful.

@lpinca

Copy link
Copy Markdown
Member

See also #63249

As a happy side bonus, as part of this work I hunted down the underlying issue for #58252: buggy cleanup of reset streams.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ciPRs that need a full CI run.request-ciAdd this label to start a Jenkins CI on a PR.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@trivikr@aduh95@lpinca@nodejs-github-bot