Skip to content

Commit 197ffdc

Browse files
committed
[Test Failure] SslStreamDisposeTest.Dispose_ParallelWithHandshake_ThrowsODE on Unix
Fixes dotnet#113833
1 parent 4b16dce commit 197ffdc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamDisposeTest.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public async Task Dispose_PendingReadAsync_ThrowsODE(bool bufferedRead)
6060
using CancellationTokenSource cts = new CancellationTokenSource();
6161
cts.CancelAfter(TestConfiguration.PassingTestTimeout);
6262

63-
(SslStream client, SslStream server) = TestHelper.GetConnectedSslStreams(leaveInnerStreamOpen: true);
63+
(SslStream client, SslStream server) = TestHelper.GetConnectedStreams();
6464
using (client)
6565
using (server)
6666
using (X509Certificate2 serverCertificate = Configuration.Certificates.GetServerCertificate())
@@ -150,7 +150,8 @@ static async Task ValidateExceptionAsync(Task task)
150150
await task;
151151
}
152152
catch (Exception ex) when (ex
153-
is ObjectDisposedException // disposed locally
153+
is ObjectDisposedException // disposed locall
154+
or InvalidOperationException // Writing to a disposed ConnectedStream (test only, does not happen with NetworkStream)
154155
or IOException // disposed remotely (received unexpected EOF)
155156
or AuthenticationException) // disposed wrapped in AuthenticationException or error from platform library
156157
{

0 commit comments

Comments
 (0)