Skip to content

[HTTP] Re-enable PostAsync_Cancel_CancellationTokenPassedToContent test#124597

Open
ManickaP wants to merge 3 commits intodotnet:mainfrom
ManickaP:fix/reenable-41531-cancel-timeout
Open

[HTTP] Re-enable PostAsync_Cancel_CancellationTokenPassedToContent test#124597
ManickaP wants to merge 3 commits intodotnet:mainfrom
ManickaP:fix/reenable-41531-cancel-timeout

Conversation

@ManickaP
Copy link
Member

@ManickaP ManickaP commented Feb 19, 2026

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.

Also removed outerloop as 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 a
60-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.

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>
Copilot AI review requested due to automatic review settings February 19, 2026 14:34
@ManickaP
Copy link
Member Author

/azp run runtime-libraries-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
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 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.

…st.Cancellation.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SocketsHttpHandler_HttpClientHandler_Cancellation_Test_Http2.PostAsync_Cancel_CancellationTokenPassedToContent outerloop fail

2 participants

Comments