Browse Source

[system] Fix soctec test to not block indefinitely

Marek Safar 11 years ago
parent
commit
fb85eae8fc
1 changed files with 1 additions and 10 deletions
  1. 1 10
      mcs/class/System/Test/System.Net.Sockets/SocketTest.cs

+ 1 - 10
mcs/class/System/Test/System.Net.Sockets/SocketTest.cs

@@ -1795,16 +1795,7 @@ namespace MonoTests.System.Net.Sockets
 			}
 			*/
 
-			var sw = new global::System.Diagnostics.Stopwatch ();
-			sw.Start ();
-
-			BCCalledBack.WaitOne ();
-
-			sw.Stop ();
-			Console.WriteLine (sw.ElapsedMilliseconds);
-
-			if (sw.ElapsedMilliseconds > 30000)
-				Assert.Fail ("BeginConnectMultiple wait failed");
+			Assert.IsTrue (BCCalledBack.WaitOne (30000), "#0");
 			
 			Assert.AreEqual (true, BCConnected, "BeginConnectMultiple #1");
 			Assert.AreEqual (AddressFamily.InterNetwork, sock.RemoteEndPoint.AddressFamily, "BeginConnectMultiple #2");