-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Conversation
Tagging subscribers to this area: @dotnet/ncl Issue DetailsThis timeout is not needed and masks a more useful exception thrown To help debug #52597. @antonfirsov ptal
|
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. |
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. |
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?). |
This timeout is not needed and masks a more useful exception thrown by the test.
@antonfirsov I've added a |
@tmds do you need this to be merged to see if you are able to unmask the errors with the change? |
I think it's more meaningful for everyone that the operation times out rather than the whole test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Haven't noticed first, but timeout is still missing at this line: runtime/src/libraries/System.Net.Sockets/tests/FunctionalTests/SendReceive/SendReceive.cs Line 1029 in ba88131
Better to go safe! |
/azp run runtime |
Azure Pipelines successfully started running 1 pipeline(s). |
.WaitAsync(TimeSpan.FromMilliseconds(TestSettings.PassingTestTimeout)) | ||
.GetAwaiter().GetResult(); |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Test failures are unrelated. I'm merging this as-is, since the change is definitely an improvement. |
This timeout is not needed and masks a more useful exception thrown
by the test.
To help debug #52597.
@antonfirsov ptal