Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Commit 84fde9d

Browse files
committed
Debugging
1 parent b518c9c commit 84fde9d

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

test/Kestrel.Transport.FunctionalTests/HandleInheritanceTests.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,18 @@ public async Task SpawnChildProcess_DoesNotInheritListenHandle()
4747
var port = host.GetPort();
4848
await host.StopAsync();
4949

50-
// We should not be able to connect if the handle was correctly closed and not inherited by the child process.
51-
using (var client = new TcpClient())
50+
await Assert.ThrowsAnyAsync<SocketException>(async () =>
5251
{
53-
await Assert.ThrowsAnyAsync<SocketException>(() => client.ConnectAsync("127.0.0.1", port));
54-
}
52+
// Mac sockets are flaky
53+
for (var i = 0; i < 5; i++)
54+
{
55+
// We should not be able to connect if the handle was correctly closed and not inherited by the child process.
56+
using (var client = new TcpClient())
57+
{
58+
await client.ConnectAsync("127.0.0.1", port).DefaultTimeout();
59+
}
60+
}
61+
});
5562

5663
process.Kill();
5764
}

0 commit comments

Comments
 (0)