[System] Make SocketAsyncTest.SendAsync give more helpful failures.
authorAlex Rønne Petersen <alexrp@xamarin.com>
Tue, 7 Jun 2016 18:24:14 +0000 (20:24 +0200)
committerAlex Rønne Petersen <alexrp@xamarin.com>
Wed, 8 Jun 2016 13:04:18 +0000 (15:04 +0200)
mcs/class/System/Test/System.Net.Sockets/SocketAsyncTest.cs

index f137139a55f6f110dedb325a862eba722d69572b..d59d39fad89d232798a341ce06bdd238b3da044f 100644 (file)
@@ -106,11 +106,11 @@ namespace MonoTests.System.Net.Sockets
                        bool res = clientSocket.SendAsync (e);
                        if (res) {
                                if (!m.WaitOne (1500))
-                                       throw new TimeoutException ();
+                                       Assert.Fail ("Timeout #1");
                        }
 
                        if (!mainEvent.WaitOne (1500))
-                               throw new TimeoutException ();
+                               Assert.Fail ("Timeout #2");
                        if (error != null)
                                throw error;
 
@@ -124,13 +124,13 @@ namespace MonoTests.System.Net.Sockets
                        res = clientSocket.SendAsync (e);
                        if (res) {
                                if (!m.WaitOne (1500))
-                                       throw new TimeoutException ();
+                                       Assert.Fail ("Timeout #3");
                        }
 
                        if (!mainEvent.WaitOne (1500))
-                               throw new TimeoutException ();
+                               Assert.Fail ("Timeout #4");
                        if (error != null)
                                throw error;
                }
        }
-}
\ No newline at end of file
+}