[tests] Works in stand-alone app, fails in nunit
authorMarek Habersack <grendel@twistedcode.net>
Thu, 11 Jun 2015 18:00:43 +0000 (20:00 +0200)
committerMarek Habersack <grendel@twistedcode.net>
Wed, 15 Jul 2015 18:45:16 +0000 (20:45 +0200)
mcs/class/System/Test/System.Net/WebRequestTest.cs

index 8dbdde051bc9318009c96de9fb34ff5d3ebc9960..fc493ab585ab8686e26a0b0ea666f07d17bad26e 100644 (file)
@@ -316,6 +316,9 @@ namespace MonoTests.System.Net {
        }\r
 \r
        [Test] //BNC#323452\r
+       // Throws exception with Status == Timeout. The same code behaves as the test expects when run from a regular app.
+       // Might be an issue with the test suite. To investigate.
+       [Category("AndroidNotWorking")] 
        public void TestFailedConnection ()\r
        {\r
                try {\r
@@ -326,7 +329,7 @@ namespace MonoTests.System.Net {
                        //#if NET_2_0 e.Message == "Unable to connect to the remote server"\r
                        //#if NET_1_1 e.Message == "The underlying connection was closed: Unable to connect to the remote server."\r
 \r
-                       Assert.AreEqual (((WebException)e).Status, WebExceptionStatus.ConnectFailure);\r
+                       Assert.AreEqual (WebExceptionStatus.ConnectFailure, ((WebException)e).Status);\r
 \r
                        //#if !NET_1_1 (this is not true in .NET 1.x)\r
                        Assert.IsNotNull (e.InnerException);\r