Skip to content

[HTTP] Re-enable GetAsync_CancelDuringResponseBodyReceived_Buffered test#124594

Merged
ManickaP merged 3 commits intodotnet:mainfrom
ManickaP:fix/reenable-25760-cancel-timing
Feb 23, 2026
Merged

[HTTP] Re-enable GetAsync_CancelDuringResponseBodyReceived_Buffered test#124594
ManickaP merged 3 commits intodotnet:mainfrom
ManickaP:fix/reenable-25760-cancel-timing

Conversation

@ManickaP
Copy link
Member

Remove the ActiveIssue attribute disabling this cancellation test. The original failure was a timing assertion where elapsed time (31.67s) exceeded a 30-second threshold. The threshold has since been increased to 60 seconds in ValidateClientCancellationAsync, which provides sufficient margin for CI environments under load.

Fixes #25760

Remove the ActiveIssue attribute disabling this cancellation test.
The original failure was a timing assertion where elapsed time
(31.67s) exceeded a 30-second threshold. The threshold has since been
increased to 60 seconds in ValidateClientCancellationAsync, which
provides sufficient margin for CI environments under load.

Fixes dotnet#25760

Co-authored-by: Copilot <223556219+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

Re-enables a previously disabled HttpClient cancellation functional test now that the shared cancellation timing threshold has been relaxed to better tolerate slower CI environments.

Changes:

  • Removed the [ActiveIssue] suppression from GetAsync_CancelDuringResponseBodyReceived_Buffered_TaskCanceledQuickly.

Copy link
Member

@rzikm rzikm left a comment

Choose a reason for hiding this comment

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

LGTM if CI passes

@ManickaP
Copy link
Member Author

Re-enabled test seems to be running successfully, e.g.:
image

@ManickaP
Copy link
Member Author

Getting timeouts on WinHttpHandler:

System.Net.Http.WinHttpHandler.Functional.Tests: [Long Running Test] 'System.Net.Http.Functional.Tests.PlatformHandler_HttpClientHandler_Cancellation_Test.GetAsync_CancelDuringResponseBodyReceived_Buffered_TaskCanceledQuickly', Elapsed: 00:02:09

Investigating.

WinHttpHandler does not observe cancellation during buffered response
body reads (HttpCompletionOption.ResponseContentRead), causing the test
to hang indefinitely. Skip it for WinHttpHandler while keeping it
enabled for SocketsHttpHandler.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ManickaP
Copy link
Member Author

So this test needs to stay disabled on .NET Framework, we're not passing cancellationToken to content buffering, because no such overload exists:
https://github.com/microsoft/referencesource/blob/ec9fa9ae770d522a5b5f0607898044b7478574a3/System/net/System/Net/Http/HttpClient.cs#L536

@ManickaP ManickaP merged commit 0548fed into dotnet:main Feb 23, 2026
87 of 90 checks passed
@ManickaP ManickaP deleted the fix/reenable-25760-cancel-timing branch February 23, 2026 14:48
iremyux pushed a commit to iremyux/dotnet-runtime that referenced this pull request Mar 2, 2026
…est (dotnet#124594)

Remove the `ActiveIssue` attribute disabling this cancellation test. The
original failure was a timing assertion where elapsed time (31.67s)
exceeded a 30-second threshold. The threshold has since been increased
to 60 seconds in `ValidateClientCancellationAsync`, which provides
sufficient margin for CI environments under load.

Fixes dotnet#25760

---------

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

4 participants