Skip to content

Quarantine POST_MultipleRequests_PooledStreamAndHeaders - #68167

Open
Vinoth2562000 wants to merge 2 commits into
dotnet:mainfrom
Vinoth2562000:Multiple_Requests
Open

Quarantine POST_MultipleRequests_PooledStreamAndHeaders#68167
Vinoth2562000 wants to merge 2 commits into
dotnet:mainfrom
Vinoth2562000:Multiple_Requests

Conversation

@Vinoth2562000

Copy link
Copy Markdown

Quarantine POST_MultipleRequests_PooledStreamAndHeaders

Description

This unquarantines the test, which failed intermittently on CI due to a coarse 100ms poll for the "StreamPooled" log.

Root cause

The test polled for the "StreamPooled" log with a 100ms initial delay. On CI, the second request's AcceptAsync sometimes ran on a freshly allocated HttpRequestHeaders before the first stream was pushed to the pool — so Assert.Same failed (same value, different reference).

Fix

Replace the polling WaitForLogAsync with an event-driven wait on TestSink.MessageLogged:

  • Subscribe before the first request → log cannot be missed
  • TCS fires the instant the log is written (inside _poolLock, right after StreamPool.Push)
  • try/finally ensures the handler is unsubscribed on test failure

Assert.Same is preserved — the test still detects cache misses (its original purpose).

Screenshot

image

Fixes #52573

@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Aug 3, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Thanks for your PR, @Vinoth2562000. Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@Vinoth2562000
Vinoth2562000 marked this pull request as ready for review August 4, 2026 11:35
@Vinoth2562000
Vinoth2562000 requested a review from halter73 as a code owner August 4, 2026 11:35
Copilot AI review requested due to automatic review settings August 4, 2026 11:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 unquarantines POST_MultipleRequests_PooledStreamAndHeaders by replacing a polling-based log wait with an event-driven wait tied to TestSink.MessageLogged, aiming to eliminate intermittent CI failures while preserving the Assert.Same cache-miss detection.

Changes:

  • Removed the [QuarantinedTest] attribute for POST_MultipleRequests_PooledStreamAndHeaders.
  • Replaced WaitForLogAsync polling for the QUIC "StreamPooled" log with an event-driven TaskCompletionSource that completes when the log is emitted.
  • Added try/finally cleanup to unsubscribe the MessageLogged handler.

Comment on lines +338 to +339
TestSink.MessageLogged += handler;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quarantine POST_MultipleRequests_PooledStreamAndHeaders

2 participants