Merge pull request #4248 from Unity-Technologies/boehm-gc-alloc-fixed
[mono.git] / mcs / class / System / Test / System.Net.Sockets / SocketTest.cs
index 58c1c5c5a3c263d177645380b69b75f1944b1272..7a0851912ea37254f1112bfdf066d53932551903 100755 (executable)
@@ -2717,6 +2717,9 @@ namespace MonoTests.System.Net.Sockets
                }
 
                [Test]
+#if FEATURE_NO_BSD_SOCKETS
+               [ExpectedException (typeof (AggregateException))] // Something catches the PlatformNotSupportedException and re-throws an AggregateException    
+#endif
                public void ConcurrentExceedSocketLimit ()
                {
                        var tasks = new Task[4];
@@ -2727,10 +2730,13 @@ namespace MonoTests.System.Net.Sockets
                }
 
                [Test]
+#if FEATURE_NO_BSD_SOCKETS
+               [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
                public void SendGenericExceedBuffer ()
                {
                        // Create a buffer larger than the default max.
-                       const int BUFFER_SIZE = 256 * 256 * 65;
+                       const int BUFFER_SIZE = 65 * 1024;
                        int i;
 
                        IPEndPoint endpoint = new IPEndPoint(IPAddress.Loopback, NetworkHelpers.FindFreePort ());
@@ -2770,7 +2776,7 @@ namespace MonoTests.System.Net.Sockets
                                Assert.AreEqual (BUFFER_SIZE, totalReceived, "#2");
                        });
 
-                       Assert.IsTrue (Task.WaitAll (new []{sendTask, recvTask}, 15 * 1000), "#2a");
+                       Assert.IsTrue (Task.WaitAll (new []{sendTask, recvTask}, 20 * 1000), "#2a");
 
                        for (i = 0; i < BUFFER_SIZE; i++) {
                                Assert.AreEqual (recvbuf[i], sendbuf[i],
@@ -3714,8 +3720,11 @@ namespace MonoTests.System.Net.Sockets
 
                [Test]
                [Category ("NotOnMac")]
-                public void ConnectedProperty ()
-                {
+#if FULL_AOT_DESKTOP
+               [Ignore ("https://bugzilla.xamarin.com/show_bug.cgi?id=52157")]
+#endif
+               public void ConnectedProperty ()
+               {
                        TcpListener listener = new TcpListener (IPAddress.Loopback, NetworkHelpers.FindFreePort ());
                        listener.Start();