test: make http2 close-while-writing single-shot by trivikr · Pull Request #63388 · nodejs/node · GitHub
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

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

Conversation

@trivikr

@trivikr trivikr commented May 17, 2026

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-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure. labels May 17, 2026
@codecov

codecov Bot commented May 17, 2026 •

Copy link
Copy Markdown

@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label May 17, 2026
@aduh95

aduh95 commented May 18, 2026

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

@lpinca lpinca 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

trivikr commented May 19, 2026

Copy link
Copy Markdown
Member Author

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.

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

trivikr commented May 19, 2026

Copy link
Copy Markdown
Member Author

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

lpinca commented May 19, 2026

Copy link
Copy Markdown
Member

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. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. test Issues and PRs related to Node.js core tests and test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants