Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sockets.tests: TcpReceiveSendGetsCanceledByDispose: remove Timeout. #52599

Merged
merged 3 commits into from
Jun 8, 2021

Conversation

tmds
Copy link
Member

@tmds tmds commented May 11, 2021

This timeout is not needed and masks a more useful exception thrown
by the test.

To help debug #52597.

@antonfirsov ptal

@ghost
Copy link

ghost commented May 11, 2021

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

Issue Details

This timeout is not needed and masks a more useful exception thrown
by the test.

To help debug #52597.

@antonfirsov ptal

Author: tmds
Assignees: -
Labels:

area-System.Net.Sockets

Milestone: -

@antonfirsov
Copy link
Member

antonfirsov commented May 11, 2021

Are you sure this won't turn them into infinite "Long Running" tests timing out the whole System.Net.Sockets.Tests workitem? This is what I would expect from this change, am I missing something?

If memory serves well, this happened in the past, which is the reason why I added the timeout.

@tmds
Copy link
Member Author

tmds commented May 11, 2021

Are you sure this won't turn them into infinite "Long Running" tests timing out the whole System.Net.Sockets.Tests workitem?

You're right. I missed that this code was refactored. This used to throw on timeout here: 5a4483e#diff-2644f228b9c0083b38290d3faabc8d69d32a0372220463c42b7f4ac14c29a77cL1035.

I'll make some more changes.

@antonfirsov
Copy link
Member

WaitAsync should be equivalent to that check, I suspect the timeout might be happening at other places (ReceiveAsync/SendAsync tasks which are not being cancelled by timeouts?).

tmds added 2 commits May 12, 2021 06:36
This timeout is not needed and masks a more useful exception thrown
by the test.
@tmds
Copy link
Member Author

tmds commented May 12, 2021

@antonfirsov I've added a WaitAsync on each await in the test.

@antonfirsov
Copy link
Member

@tmds do you need this to be merged to see if you are able to unmask the errors with the change?

@tmds
Copy link
Member Author

tmds commented May 12, 2021

I think it's more meaningful for everyone that the operation times out rather than the whole test.

antonfirsov
antonfirsov previously approved these changes May 12, 2021
Copy link
Member

@antonfirsov antonfirsov left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@antonfirsov antonfirsov self-requested a review May 12, 2021 13:32
@antonfirsov antonfirsov dismissed their stale review May 12, 2021 13:33

undo approval?

@antonfirsov
Copy link
Member

Haven't noticed first, but timeout is still missing at this line:

SendAsync(socket1, buffer).GetAwaiter().GetResult();

Better to go safe!

@antonfirsov
Copy link
Member

/azp run runtime

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Comment on lines +1030 to +1031
.WaitAsync(TimeSpan.FromMilliseconds(TestSettings.PassingTestTimeout))
.GetAwaiter().GetResult();
Copy link
Member

Choose a reason for hiding this comment

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

This could also just be:

.Wait(TimeSpan.FromMilliseconds(TestSettings.PassingTestTimeout));

If that fails it'll end up throwing an AggregateException, but I don't see anything paying attention to the exact exception type anyway...

Copy link
Member

@antonfirsov antonfirsov left a comment

Choose a reason for hiding this comment

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

LGTM.

@antonfirsov
Copy link
Member

Test failures are unrelated. I'm merging this as-is, since the change is definitely an improvement.

@antonfirsov antonfirsov merged commit 06cf0b0 into dotnet:main Jun 8, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jul 8, 2021
@karelz karelz added this to the 6.0.0 milestone Jul 15, 2021
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.

4 participants