[runtime] Fix test_op_il_seq_point in amd64.
[mono.git] / mcs / class / System / Test / System.Net.WebSockets / ClientWebSocketTest.cs
index 6ac81723d256323574d1fe207424f04c333676b0..7422a1f2695dc2e345220d5736974c5223a40a4e 100644 (file)
@@ -10,6 +10,7 @@ using System.Text;
 
 using NUnit.Framework;
 
+using MonoTests.Helpers;
 
 namespace MonoTests.System.Net.WebSockets
 {
@@ -17,7 +18,7 @@ namespace MonoTests.System.Net.WebSockets
        public class ClientWebSocketTest
        {
                const string EchoServerUrl = "ws://echo.websocket.org";
-               const int Port = 42123;
+               int Port = NetworkHelpers.FindFreePort ();
                HttpListener listener;
                ClientWebSocket socket;
                MethodInfo headerSetMethod;
@@ -47,6 +48,7 @@ namespace MonoTests.System.Net.WebSockets
                }
 
                [Test]
+               [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
                public void ServerHandshakeReturnCrapStatusCodeTest ()
                {
                        // On purpose, 
@@ -63,6 +65,7 @@ namespace MonoTests.System.Net.WebSockets
                }
 
                [Test]
+               [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
                public void ServerHandshakeReturnWrongUpgradeHeader ()
                {
                        #pragma warning disable 4014
@@ -81,6 +84,7 @@ namespace MonoTests.System.Net.WebSockets
                }
 
                [Test]
+               [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
                public void ServerHandshakeReturnWrongConnectionHeader ()
                {
                        #pragma warning disable 4014
@@ -101,7 +105,7 @@ namespace MonoTests.System.Net.WebSockets
                }
 
                [Test]
-               [Ignore ("See bug #24340")]
+               [Category ("AndroidNotWorking")] // The test hangs when ran as part of the entire BCL test suite. Works when only this fixture is ran
                public void EchoTest ()
                {
                        const string Payload = "This is a websocket test";
@@ -126,7 +130,7 @@ namespace MonoTests.System.Net.WebSockets
                }
 
                [Test]
-               [Ignore ("See bug #24340")]
+               [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
                public void CloseOutputAsyncTest ()
                {
                        Assert.IsTrue (socket.ConnectAsync (new Uri (EchoServerUrl), CancellationToken.None).Wait (5000));
@@ -143,6 +147,7 @@ namespace MonoTests.System.Net.WebSockets
                }
 
                [Test]
+               [Category ("AndroidNotWorking")] // 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));
@@ -159,6 +164,7 @@ namespace MonoTests.System.Net.WebSockets
                }
 
                [Test, ExpectedException (typeof (ArgumentNullException))]
+               [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
                public void SendAsyncArgTest_NoArray ()
                {
                        Assert.IsTrue (socket.ConnectAsync (new Uri (EchoServerUrl), CancellationToken.None).Wait (5000));
@@ -172,6 +178,7 @@ namespace MonoTests.System.Net.WebSockets
                }
 
                [Test, ExpectedException (typeof (ArgumentNullException))]
+               [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
                public void ReceiveAsyncArgTest_NoArray ()
                {
                        Assert.IsTrue (socket.ConnectAsync (new Uri (EchoServerUrl), CancellationToken.None).Wait (5000));
@@ -179,6 +186,7 @@ namespace MonoTests.System.Net.WebSockets
                }
 
                [Test]
+               [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
                public void ReceiveAsyncWrongState_Closed ()
                {
                        try {
@@ -193,6 +201,7 @@ namespace MonoTests.System.Net.WebSockets
                }
 
                [Test]
+               [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
                public void SendAsyncWrongState_Closed ()
                {
                        try {
@@ -207,6 +216,7 @@ namespace MonoTests.System.Net.WebSockets
                }
 
                [Test]
+               [Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
                public void SendAsyncWrongState_CloseSent ()
                {
                        try {