diff options
author | Marek Safar <marek.safar@gmail.com> | 2017-02-23 13:07:12 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2017-02-23 13:08:14 +0300 |
commit | a5f5ca7e4b33bfe63765fc8a08996181a7e2f0aa (patch) | |
tree | 67adef15fa5370a730b90c706e64dbbb68f970b2 | |
parent | 368c02f522ce670d436f7752dac82c076bf7af41 (diff) |
[System] Update flaky test
-rw-r--r-- | mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs b/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs index cf4418e8d7a..b19688cf44c 100644 --- a/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs +++ b/mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs @@ -159,7 +159,11 @@ namespace MonoTests.System.Net.WebSockets [Category ("MobileNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran public void CloseAsyncTest () { - Assert.IsTrue (socket.ConnectAsync (new Uri (EchoServerUrl), CancellationToken.None).Wait (5000)); + if (!socket.ConnectAsync (new Uri (EchoServerUrl), CancellationToken.None).Wait (5000)) { + Assert.Inconclusive (socket.State.ToString ()); + return; + } + Assert.AreEqual (WebSocketState.Open, socket.State); Assert.IsTrue (socket.CloseAsync (WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None).Wait (5000)); |