Skip to content

improve ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperation test - #42054

Merged
wfurt merged 1 commit into
dotnet:masterfrom
wfurt:CancellationRequestedAfterConnect
Sep 10, 2020
Merged

wfurt merged 1 commit into
dotnet:masterfrom
wfurt:CancellationRequestedAfterConnect

Conversation

@wfurt

@wfurt wfurt commented Sep 10, 2020

Copy link
Copy Markdown
Member

This is follow-up on #38900. In this particular test, the client is cancelling while Loopback server is still trying to set things up. Originally we saw 'SocketException : Invalid argument` when setting NoDelay. With the #38900 that went away but the problem moved.

Since this test is really trying to verify client behavior, I added try/catch to swallow Loopback server exception.
Alternatively, I think we would need to add synchronization and wait with cancellation until we are sure we are in AcceptConnectionAsync callback code.

fixes #38159

@wfurt wfurt added the test-enhancement Improvements of test source code label Sep 10, 2020
@wfurt
wfurt requested a review from a team September 10, 2020 02:17
@wfurt wfurt self-assigned this Sep 10, 2020
@ghost

ghost commented Sep 10, 2020

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@ManickaP ManickaP left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@stephentoub

Copy link
Copy Markdown
Member

/backport to release/5.0

@github-actions

Copy link
Copy Markdown
Contributor

@ghost ghost locked as resolved and limited conversation to collaborators Dec 25, 2020
@karelz karelz added this to the 6.0.0 milestone Jan 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Net.Security test-enhancement Improvements of test source code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperationCanceledException failures in OSX

5 participants