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

improve SendFileGetsCanceledByDispose test #79718

Merged
merged 1 commit into from
Dec 16, 2022
Merged

Conversation

wfurt
Copy link
Member

@wfurt wfurt commented Dec 15, 2022

The test Is flaky and failing in CI occasionally. I was able to reproduce the failure easily by adding small delay just before the SendFileAsync it seems like if creating of the test file takes longer than usually this would fail.

I was originally thinking about simple catching the ODE but at the end I decided to change the logic. By reading from the other end I assure the sending operation actually started. One byte does not really change the logic that assumes that large data would full the socket buffer and block.

fixes #75354

@wfurt wfurt added area-System.Net.Sockets test-enhancement Improvements of test source code labels Dec 15, 2022
@wfurt wfurt added this to the 8.0.0 milestone Dec 15, 2022
@wfurt wfurt requested review from antonfirsov and liveans December 15, 2022 20:35
@wfurt wfurt self-assigned this Dec 15, 2022
@ghost
Copy link

ghost commented Dec 15, 2022

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

Issue Details

The test Is flaky and failing in CI occasionally. I was able to reproduce the failure easily by adding small delay just before the SendFileAsync it seems like if creating of the test file takes longer than usually this would fail.

I was originally thinking about simple catching the ODE but at the end I decided to change the logic. By reading from the other end I assure the sending operation actually started. One byte does not really change the logic that assumes that large data would full the socket buffer and block.

fixes #75354

Author: wfurt
Assignees: wfurt
Labels:

area-System.Net.Sockets, test-enhancement

Milestone: 8.0.0

@wfurt
Copy link
Member Author

wfurt commented Dec 16, 2022

wasm test failure is unrelated.

@wfurt wfurt merged commit 24bbee8 into dotnet:main Dec 16, 2022
@wfurt wfurt deleted the SendFileAsync branch December 16, 2022 19:58
@ghost ghost locked as resolved and limited conversation to collaborators Jan 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net.Sockets test-enhancement Improvements of test source code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SendFileGetsCanceledByDispose failed with ObjectDisposedException
3 participants