[tests] Fails on mobile with no details
authorMarek Habersack <grendel@twistedcode.net>
Thu, 11 Jun 2015 17:59:45 +0000 (19:59 +0200)
committerMarek Habersack <grendel@twistedcode.net>
Wed, 15 Jul 2015 18:45:15 +0000 (20:45 +0200)
mcs/class/System/Test/System.Net/SocketResponder.cs

index 6ee086f60746c2bca7cfa70d505e0aed404edd62..1e027b79f9343dc4f76fddb1e5ea1749c87573f5 100644 (file)
@@ -119,6 +119,14 @@ namespace MonoTests.System.Net
                                        // ignore interruption of blocking call
                                        if (ex.ErrorCode != SOCKET_CLOSED && ex.ErrorCode != SOCKET_INVALID_ARGS)
                                                throw;
+#if MOBILE
+                               } catch (InvalidOperationException ex) {
+                                       // This breaks some tests running on Android. The problem is that the stack trace
+                                       // doesn't point to where the exception is actually thrown from but the entire process
+                                       // is aborted because of unhandled exception.
+                                       Console.WriteLine ("SocketResponder.Listen failed:");
+                                       Console.WriteLine (ex);
+#endif
                                } finally {
                                        Thread.Sleep (500);
                                        if (socket != null)