Skip to content

Passed cancellationToken might be default. - #37441

Merged
ManickaP merged 1 commit into
dotnet:masterfrom
ManickaP:mapichov/36689_default_ct
Jun 5, 2020
Merged

ManickaP merged 1 commit into
dotnet:masterfrom
ManickaP:mapichov/36689_default_ct

Conversation

@ManickaP

@ManickaP ManickaP commented Jun 4, 2020 •

Copy link
Copy Markdown
Member

In cases like WinHttpHandler (which is also build against .NET Framework), there is no way how to properly pass cancellationToken to content's CopyToAsync. The overloads accepting it are recent addition and not part of .NET Standard.
The tests were deadlocking waiting for cts.Task which is supposed to be finished from cancellationToken.Register(...) on the token that is not bound to test's TaskCompletionSource.

Fixes #36689

cc: @stephentoub

@ghost

ghost commented Jun 4, 2020

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/ncl
Notify danmosemsft if you want to be subscribed.

@ManickaP
ManickaP requested a review from a team June 4, 2020 19:34
@ManickaP

ManickaP commented Jun 4, 2020

Copy link
Copy Markdown
Member Author

/azp run runtime-libraries outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ManickaP

ManickaP commented Jun 4, 2020

Copy link
Copy Markdown
Member Author

BTW, does the test still make sense if we're bypassing the passed in cancellationToken?

@stephentoub

Copy link
Copy Markdown
Member

BTW, does the test still make sense if we're bypassing the passed in cancellationToken?

The test is named "PostAsync_Cancel_CancellationTokenPassedToContent"... if the cancellation token isn't passed to the content with WinHttpHandler, then we probably should just skip the test on WinHttpHandler ;)

@ManickaP

ManickaP commented Jun 5, 2020

Copy link
Copy Markdown
Member Author

/azp run runtime-libraries outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ManickaP

ManickaP commented Jun 5, 2020

Copy link
Copy Markdown
Member Author

Test skipped on WinHttpHandler completely.

ManickaP added a commit to ManickaP/runtime that referenced this pull request Jun 5, 2020
@ManickaP
ManickaP merged commit f226796 into dotnet:master Jun 5, 2020
@ManickaP
ManickaP deleted the mapichov/36689_default_ct branch June 5, 2020 11:44
@davidsh davidsh added this to the 5.0 milestone Jun 5, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WinHttpHandler PostAsync_Cancel_CancellationTokenPassedToContent test failing in CI

4 participants