diff --git a/test/Renci.SshNet.IntegrationTests/ConnectivityTests.cs b/test/Renci.SshNet.IntegrationTests/ConnectivityTests.cs index 15451b1e..16b80e16 100644 --- a/test/Renci.SshNet.IntegrationTests/ConnectivityTests.cs +++ b/test/Renci.SshNet.IntegrationTests/ConnectivityTests.cs @@ -171,6 +171,7 @@ namespace Renci.SshNet.IntegrationTests try { + WaitForConnectionInterruption(client); client.ListDirectory("/"); Assert.Fail(); } @@ -260,9 +261,9 @@ namespace Renci.SshNet.IntegrationTests client.Connect(); var disruptor = _sshConnectionDisruptor.BreakConnections(); - Thread.Sleep(100); try { + WaitForConnectionInterruption(client); client.ListDirectory("/"); Assert.Fail(); }