-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Closed
Copy link
Labels
area-System.Net.Socketsdisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issue
Milestone
Description
Noticed in #118241, when the test is fixed to correctly await the ThrowsAsync (before it was just eating the error) then we see the following:
Assert.Throws() Failure: Exception type was not an exact match
Expected: typeof(System.InvalidOperationException)
Actual: typeof(System.Net.Sockets.SocketException)
---- System.Net.Sockets.SocketException : Transport endpoint is not connected
Stack trace
at System.Net.Sockets.Tests.Disconnect`1.Disconnect_NotConnected_ThrowsInvalidOperationException(Boolean reuseSocket) in /_/src/libraries/System.Net.Sockets/tests/FunctionalTests/DisconnectTest.cs:line 83
--- End of stack trace from previous location ---
----- Inner Stack Trace -----
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, Boolean disconnectOnFailure, String callerName) in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 3913
at System.Net.Sockets.Socket.Shutdown(SocketShutdown how) in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 2820
at System.Net.Sockets.SocketPal.Disconnect(Socket socket, SafeSocketHandle handle, Boolean reuseSocket) in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketPal.Unix.cs:line 2161
at System.Net.Sockets.SocketAsyncEventArgs.DoOperationDisconnect(Socket socket, SafeSocketHandle handle, CancellationToken _) in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.Unix.cs:line 96
at System.Net.Sockets.Socket.DisconnectAsync(SocketAsyncEventArgs e, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs:line 3049
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.DisconnectAsync(Socket socket, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs:line 1214
at System.Net.Sockets.Socket.DisconnectAsync(Boolean reuseSocket, CancellationToken cancellationToken) in /_/src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.Tasks.cs:line 242
at System.Net.Sockets.Tests.SocketHelperTask.DisconnectAsync(Socket s, Boolean reuseSocket) in /_/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketTestHelper.cs:line 251
at System.Net.Sockets.Tests.SocketTestHelperBase`1.DisconnectAsync(Socket s, Boolean reuseSocket) in /_/src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketTestHelper.cs:line 448
at System.Net.Sockets.Tests.Disconnect`1.<>c__DisplayClass3_1.<<Disconnect_NotConnected_ThrowsInvalidOperationException>b__0>d.MoveNext() in /_/src/libraries/System.Net.Sockets/tests/FunctionalTests/DisconnectTest.cs:line 83
--- End of stack trace from previous location ---
Metadata
Metadata
Assignees
Labels
area-System.Net.Socketsdisabled-testThe test is disabled in source code against the issueThe test is disabled in source code against the issue