Skip to content

Wait for HTTP/2 streams to return to pool - #46

Closed
mmitche wants to merge 1 commit into
mainfrom
mmitche-ci-flakiness-triage-1dd
Closed

mmitche wants to merge 1 commit into
mainfrom
mmitche-ci-flakiness-triage-1dd

Conversation

@mmitche

@mmitche mmitche commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Wait for HTTP/2 streams to return to pool

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Wait for HTTP/2 streams to enter the pool before asserting

Description

The HTTP/2 stream-pool tests called TriggerTick() and immediately inspected StreamPool. The connection loop processes completed streams asynchronously, so the assertion could run before UpdateCompletedStreams pushed the stream into the pool.

Register a waiter for the existing Http2StreamPooled log event before triggering the tick, then await it before inspecting the pool. This keeps the tests synchronized to the operation they verify without adding delays or retries.

Validation on Windows x64:

  • ./src/Servers/Kestrel/build.cmd -restore -nobuild - passed.
  • . ./activate.ps1; dotnet test ./src/Servers/Kestrel/test/InMemory.FunctionalTests/InMemory.FunctionalTests.csproj --no-restore --filter "FullyQualifiedName~StreamPool_SingleStream_ReturnedToPool|FullyQualifiedName~StreamPool_MultipleStreamsInSequence_PooledStreamReused" - passed (3 tests; the name filter also selected the HTTP/3 test with the same method name).
  • The two exact HTTP/2 test filters were run 20 consecutive times with --no-build --no-restore - 20/20 iterations passed (40 executions).

The original failures occurred on Ubuntu arm64 Helix agents, which are unavailable on this host.

Fixes #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI flake] HTTP/2 stream-pool tests assert before completed streams are pooled

1 participant