test: fix flaky test-http2-close-while-writing#61804
Open
Han5991 wants to merge 1 commit intonodejs:mainfrom
Open
test: fix flaky test-http2-close-while-writing#61804Han5991 wants to merge 1 commit intonodejs:mainfrom
Han5991 wants to merge 1 commit intonodejs:mainfrom
Conversation
lpinca
reviewed
Feb 13, 2026
| ca, | ||
| maxSessionMemory: 1000 | ||
| }); | ||
| client.on('error', common.mustNotCall()); |
Member
There was a problem hiding this comment.
Suggested change
| client.on('error', common.mustNotCall()); |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #61804 +/- ##
==========================================
+ Coverage 89.75% 89.76% +0.01%
==========================================
Files 675 675
Lines 204676 204731 +55
Branches 39329 39343 +14
==========================================
+ Hits 183705 183779 +74
+ Misses 13272 13238 -34
- Partials 7699 7714 +15 🚀 New features to boost your workflow:
|
df7750e to
bcab32d
Compare
The test was flaky due to a race condition where `client.close()` would wait for a graceful shutdown while the server had already destroyed the session/stream, leading to a timeout. Changes: - Replace `client.close()` with `client.destroy()` in the `close` event handler of the client stream. Refs: nodejs#33156
bcab32d to
4bc4b5d
Compare
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The test was flaky due to a race condition where
client.close()wouldwait for a graceful shutdown while the server had already destroyed the
session/stream, leading to a timeout.
Changes:
client.close()withclient.destroy()in thecloseeventhandler of the client stream.
common.mustNotCall()error handlers to the client, client stream,and server session to catch unexpected errors.
if (!client_stream.destroyed)before destroying clientstream in the server's data handler.
Refs: #33156