-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix SslStreamDisposeTest for parallel handshake on Unix #114100
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
Fix SslStreamDisposeTest for parallel handshake on Unix #114100
Conversation
…owsODE on Unix Fixes dotnet#113833
…ake_ThrowsODE on Unix Fixes dotnet#113833
…hHandshake_ThrowsODE on Unix Fixes dotnet#113833
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.
Pull Request Overview
This PR fixes issues related to the parallel handshake on Unix by switching to in-memory streams and refining error filtering.
- Replace TCP streams with in-memory streams
- Update error handling to filter out InvalidOperationException during concurrent disposal
src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamDisposeTest.cs
Outdated
Show resolved
Hide resolved
Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones |
…eamDisposeTest.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
It is curious that the memory stream throes |
well, the parallel dispose call disposes the underlying StreamBuffer, causing the InvalidException when attempting to write the next chunk to underlying stream runtime/src/libraries/Common/src/System/Net/StreamBuffer.cs Lines 93 to 103 in 41e02e5
Since the StreamBuffer is just some internal helper, it does not distinguish between state where only write side was closed or the entire instance got disposed. In NetworkStream, we would get ObjectDisposedException or similar |
/ba-g Ci failures are unrelated |
Fixes #113833.
Previous fix was not enough, lots of opened sockets caused additional failures. This PR changes back to in-memory streams and filters out the InvalidOperationException which happens only in those cases.