mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-10-16 21:12:58 +08:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user