test: fix flaky http2-dispatcher test#4633
Merged
metcoder95 merged 1 commit intomainfrom Oct 21, 2025
Merged
Conversation
Replace .pipe() with pipeline() in Dispatcher#Connect test to properly handle stream errors and prevent uncaught exceptions. The test was failing intermittently with ERR_HTTP2_STREAM_ERROR when streams encountered errors during proxying. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Matteo Collina <hello@matteocollina.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4633 +/- ##
=======================================
Coverage 92.86% 92.86%
=======================================
Files 106 106
Lines 33111 33111
=======================================
Hits 30747 30747
Misses 2364 2364 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
metcoder95
approved these changes
Oct 20, 2025
Uzlopak
approved these changes
Oct 20, 2025
metcoder95
pushed a commit
that referenced
this pull request
Oct 30, 2025
Co-authored-by: Claude <noreply@anthropic.com>
Merged
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.
Summary
Fixed flaky
Dispatcher#Connecttest intest/http2-dispatcher.jsthat was intermittently failing withERR_HTTP2_STREAM_ERRORand timing out.Problem
The test was using
response.body.pipe(stream)without proper error handling. When HTTP/2 streams encountered errors (likeNGHTTP2_INTERNAL_ERROR), they became uncaught exceptions, causing random test failures and timeouts.Solution
.pipe()withpipeline()for proper error handlingTest Plan
🤖 Generated with Claude Code