fix flaky Connectivity Tests (#1403)

these two tests were not waiting for the interruption (all other usages
of BreakConnections() did). This could cause random failures because
e.g. the wrong exception is thrown.

example: https://ci.appveyor.com/project/drieseng/ssh-net/builds/49831433/job/4urb0upx63bvxcgu

Co-authored-by: Rob Hague <rob.hague00@gmail.com>
This commit is contained in:
mus65
2024-05-18 14:17:10 +02:00
committed by GitHub
parent c0a353a4de
commit fe5ed423a0
@@ -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();
}