[HTTP] Re-enable PostAsync_Cancel_CancellationTokenPassedToContent test#124597
Open
ManickaP wants to merge 3 commits intodotnet:mainfrom
Open
[HTTP] Re-enable PostAsync_Cancel_CancellationTokenPassedToContent test#124597ManickaP wants to merge 3 commits intodotnet:mainfrom
ManickaP wants to merge 3 commits intodotnet:mainfrom
Conversation
Remove the ActiveIssue attribute disabling this outerloop test. The test was disabled in January 2021 due to sporadic 60-second timeouts in CI. The HTTP/2 implementation has been significantly rewritten since then, and the underlying race conditions are likely resolved. Fixes dotnet#41531 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
/azp run runtime-libraries-coreclr outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR re-enables the PostAsync_Cancel_CancellationTokenPassedToContent HTTP/2 OuterLoop test by removing the ActiveIssue attribute that has been disabling it since historical CI flakiness (issue #41531).
Changes:
- Removed
[ActiveIssue("https://github.com/dotnet/runtime/issues/41531")]from the affected OuterLoop theory to allow it to run in CI again.
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cancellation.cs
Outdated
Show resolved
Hide resolved
…st.Cancellation.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cancellation.cs
Show resolved
Hide resolved
src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cancellation.cs
Show resolved
Hide resolved
MihaZupan
approved these changes
Feb 19, 2026
…tent Add WaitAsync(TestHelper.PassingTestTimeout) to the CreateClientAndServerAsync call to fail fast with a TimeoutException instead of hanging indefinitely if cancellation propagation regresses. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Remove the
ActiveIssueattribute disabling this outerloop test. The test was disabled in January 2021 due to sporadic 60-second timeouts in CI. The HTTP/2 implementation has been significantly rewritten since then, and the underlying race conditions are likely resolved.Also removed
outerloopas the reason was out of date, ohh boy this will absolutely return with vengeance. I can't wait to see this test in CI report next week 😄Ran for 20 iterations locally without a problem.
Fixes #41531
If this re-appears, I'll either investigate or disable again, but it's been disabled for years now, so let's see.
TLDR explanation:
Details
The original failure was a System.TimeoutException: Task timed out after 00:01:00 in
PostAsync_Cancel_CancellationTokenPassedToContent. This was a flaky timing issue — the test was hitting a60-second timeout during cancellation. It wasn't caused by a bug in the product code; it was a test that was sensitive to machine load and scheduling delays in CI.
Over time, the runtime's cancellation and HTTP/2 stream handling has been significantly improved (many fixes have landed since 2020 when this was filed). The test simply works reliably now because
the underlying timing/cancellation behavior is more robust. There's no single code change to point to — it's the cumulative effect of years of improvements.