[test/integration] Defer fake upstream read enable until initialize#45029
Merged
Conversation
Signed-off-by: Kateryna Nezdolii <kateryna.nezdolii@gmail.com>
Member
Author
|
cc @jrajahalme |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the FakeUpstream HTTP handoff flow so that when a connection is moved from new_connections_ to a FakeHttpConnection, network reads aren’t re-enabled until the HTTP codec/filter stack is ready, avoiding a race where early request bytes can be consumed before a FakeStream is created.
Changes:
- Add a
FakeHttpConnection::initialize()override and use it as the point to (re-)enable reads when appropriate. - Extend
FakeUpstream::consumeConnection()withdefer_read_enableto optionally postponereadDisable(false). - Update HTTP connection creation paths to pass
defer_read_enable=trueand rely oninitialize()to re-enable reads.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| test/integration/fake_upstream.h | Declares FakeHttpConnection::initialize() override; extends consumeConnection() API with defer_read_enable. |
| test/integration/fake_upstream.cc | Implements deferred read re-enable in FakeHttpConnection::initialize() and updates HTTP connection creation to defer read enabling. |
Signed-off-by: Kateryna Nezdolii <kateryna.nezdolii@isovalent.com>
Contributor
|
CI failure looks real. |
Signed-off-by: Kateryna Nezdolii <kateryna.nezdolii@gmail.com>
kyessenov
approved these changes
May 20, 2026
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.
When FakeUpstream hands off HTTP connections via consumeConnection(), reads were re-enabled before the codec/filter stack was initialized. This could cause early request bytes to be consumed without creating a FakeStream. Defer read re-enable until FakeHttpConnection::initialize() attaches the HTTP read filter.
Commit Message: [test/integration] Defer fake upstream read enable until initialize
Additional Description:
Risk Level: Low (test code)
Testing:
Docs Changes: NA
Release Notes:
Platform Specific Features: