diff --git a/test/Renci.SshNet.Tests/Classes/Connection/DirectConnectorTest_Connect_HostNameInvalid.cs b/test/Renci.SshNet.Tests/Classes/Connection/DirectConnectorTest_Connect_HostNameInvalid.cs index 0a29d70d7..81a5ad228 100644 --- a/test/Renci.SshNet.Tests/Classes/Connection/DirectConnectorTest_Connect_HostNameInvalid.cs +++ b/test/Renci.SshNet.Tests/Classes/Connection/DirectConnectorTest_Connect_HostNameInvalid.cs @@ -44,7 +44,7 @@ public void ConnectShouldHaveThrownSocketException() { Assert.IsNotNull(_actualException); Assert.IsNull(_actualException.InnerException); - Assert.IsTrue(_actualException.SocketErrorCode is SocketError.HostNotFound or SocketError.TryAgain); + Assert.IsTrue(_actualException.SocketErrorCode is SocketError.HostNotFound or SocketError.TryAgain or SocketError.NoData); } } } diff --git a/test/Renci.SshNet.Tests/Classes/Connection/HttpConnectorTest_Connect_ProxyHostInvalid.cs b/test/Renci.SshNet.Tests/Classes/Connection/HttpConnectorTest_Connect_ProxyHostInvalid.cs index bf9d37d41..000779d8d 100644 --- a/test/Renci.SshNet.Tests/Classes/Connection/HttpConnectorTest_Connect_ProxyHostInvalid.cs +++ b/test/Renci.SshNet.Tests/Classes/Connection/HttpConnectorTest_Connect_ProxyHostInvalid.cs @@ -52,7 +52,7 @@ public void ConnectShouldHaveThrownSocketException() { Assert.IsNotNull(_actualException); Assert.IsNull(_actualException.InnerException); - Assert.IsTrue(_actualException.SocketErrorCode is SocketError.HostNotFound or SocketError.TryAgain); + Assert.IsTrue(_actualException.SocketErrorCode is SocketError.HostNotFound or SocketError.TryAgain or SocketError.NoData); } } } diff --git a/test/Renci.SshNet.Tests/Classes/SftpClientTest.Connect.cs b/test/Renci.SshNet.Tests/Classes/SftpClientTest.Connect.cs index 499fc3045..f608ed24e 100644 --- a/test/Renci.SshNet.Tests/Classes/SftpClientTest.Connect.cs +++ b/test/Renci.SshNet.Tests/Classes/SftpClientTest.Connect.cs @@ -21,7 +21,7 @@ public void Connect_HostNameInvalid_ShouldThrowSocketExceptionWithErrorCodeHostN } catch (SocketException ex) { - Assert.IsTrue(ex.SocketErrorCode is SocketError.HostNotFound or SocketError.TryAgain); + Assert.IsTrue(ex.SocketErrorCode is SocketError.HostNotFound or SocketError.TryAgain or SocketError.NoData); } } @@ -39,7 +39,7 @@ public void Connect_ProxyHostNameInvalid_ShouldThrowSocketExceptionWithErrorCode } catch (SocketException ex) { - Assert.IsTrue(ex.SocketErrorCode is SocketError.HostNotFound or SocketError.TryAgain); + Assert.IsTrue(ex.SocketErrorCode is SocketError.HostNotFound or SocketError.TryAgain or SocketError.NoData); } } }