Skip to content

Deflake HttpStream pooling tests#65356

Merged
BrennanConroy merged 1 commit into
mainfrom
brecon/http2streampooltests
Feb 7, 2026
Merged

Deflake HttpStream pooling tests#65356
BrennanConroy merged 1 commit into
mainfrom
brecon/http2streampooltests

Conversation

@BrennanConroy
Copy link
Copy Markdown
Member

Root cause: After serverTcs.SetResult(), the echo app delegate runs asynchronously. The test immediately called
TriggerTick() + asserted StreamPool.Count == 1, but the stream hadn't completed yet (OnStreamCompleted hadn't
enqueued it to _completedStreams). The sibling test StreamPool_MultipleStreamsConcurrent_StreamsReturnedToPool
already uses WaitForAllStreamsAsync() before TriggerTick() to avoid this race. (see #57473)

Copilot AI review requested due to automatic review settings February 7, 2026 04:20
@github-actions github-actions Bot added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Feb 7, 2026
@BrennanConroy BrennanConroy enabled auto-merge (squash) February 7, 2026 04:28
@BrennanConroy BrennanConroy enabled auto-merge (squash) February 7, 2026 04:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR deflakes Kestrel HTTP/2 stream pooling functional tests by ensuring stream completion is observed before triggering the pool maintenance tick, eliminating a race where completed streams weren’t yet eligible to be returned to the pool.

Changes:

  • Add WaitForAllStreamsAsync() before TriggerTick() in several StreamPool-related tests to ensure OnStreamCompleted has run and streams are eligible for pooling.

@BrennanConroy BrennanConroy merged commit 102119a into main Feb 7, 2026
31 of 32 checks passed
@BrennanConroy BrennanConroy deleted the brecon/http2streampooltests branch February 7, 2026 05:29
@dotnet-policy-service dotnet-policy-service Bot added this to the 11.0-preview2 milestone Feb 7, 2026
@alqassemna

This comment was marked as spam.

@wtgodbe wtgodbe modified the milestones: 11.0-preview2, 11.0-preview3 Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants