test(h2): swallow late session errors in the issue-5087 timeout tests - #5694
Open
luantaraschi wants to merge 1 commit into
Open
test(h2): swallow late session errors in the issue-5087 timeout tests#5694luantaraschi wants to merge 1 commit into
luantaraschi wants to merge 1 commit into
Conversation
All three tests abort a request client-side once the timeout fires, so the server session and its socket can surface a late ECONNRESET after the test body resolved. The runner reports that as a file-level failure with no failing assertion, which is what has been happening on CI. Same swallow pattern nodejs#5674 and nodejs#5686 applied to the neighbouring h2 tests, with connection standing in for the TLS-only secureConnection hook, because these servers are h2c.
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.
test/issue-5087.jsis the last of the h2 timeout tests without the late-error guard that #5674 and #5686 added to its neighbours, and it has been failing CI on that.From the Node 26 macOS job of run 31785340849:
The assertion passed. All three tests here abort a request client-side once the timeout fires, so the server session and its socket can surface a late
ECONNRESETafter the body resolved, and the runner turns that into a file-level failure with no failing assertion to point at.Same swallow pattern as
test/http2-abort.js, applied to all three servers in the file rather than only the one that has been caught, since they have the same shape. The TLS-onlysecureConnectionhook is replaced byconnection, because these servers are h2c (createServer,useH2c: true), sosecureConnectionnever fires here.What I ran
npm run lintclean.test/issue-5087.json its own, five consecutive runs, 3 passing and 0 failing each time.npm run test:unitgives 1509 tests with 0 failures.I could not reproduce the failure locally, so I cannot claim the guard was observed catching it: I am on Windows and Node 22, and the log above is macOS and Node 26. What the local runs establish is that the guard does not change any outcome that was already green.
For context on why this one matters beyond the file: the same late-error class in
test/http2-request-never-settles.jsis currently the only red check on #5663 and #5665, and on #5670.