Parcourir la source

[tests] Disable because URL is no longer there

The test relies on presence of a specific file that is now gone. Disabled
until a stable URL is found :P
Marek Habersack il y a 10 ans
Parent
commit
be7f5259eb
1 fichiers modifiés avec 10 ajouts et 4 suppressions
  1. 10 4
      mcs/class/System/Test/System.Net/ServicePointTest.cs

+ 10 - 4
mcs/class/System/Test/System.Net/ServicePointTest.cs

@@ -53,10 +53,13 @@ public class ServicePointTest
 		HttpWebRequest req = (HttpWebRequest) WebRequest.Create ("http://www.google.com");
 		HttpWebResponse res = (HttpWebResponse) req.GetResponse ();			
 		
+#if FOUND_SOME_OTHER_URL
+		// URL is no longer found, disabled the test until a more reliable URL is found :P
 		//WriteServicePoint ("google after getting a response", google);
 		ServicePoint google2 = ServicePointManager.FindServicePoint (new Uri ("http://www.google.com/dilbert.html"));
 		Assert.AreEqual (google, google2, "#equals");
 		res.Close ();
+#endif
 		
 		// in both instances property CurrentConnections is 0 according to ms.net.
 		// let's see what it says when we do async operations...
@@ -83,10 +86,11 @@ public class ServicePointTest
 		//Console.WriteLine ("ContentLength: " + res2.ContentLength);
 		res2.Close ();
 		
-		
+		ServicePoint sp2;
+#if FOUND_SOME_OTHER_URL
 		// unless of course some buffering is taking place.. let's check
 		Uri uri2 = new Uri ("http://freedesktop.org/Software/pkgconfig/releases/pkgconfig-0.15.0.tar.gz");
-		ServicePoint sp2 = ServicePointManager.FindServicePoint (uri2);
+		sp2 = ServicePointManager.FindServicePoint (uri2);
 		req2 = (HttpWebRequest) WebRequest.Create (uri2);
 		async = req2.BeginGetResponse (null, null);
 		//WriteServicePoint ("Large file: after async BeginGetResponse", sp2);
@@ -97,6 +101,7 @@ public class ServicePointTest
 		// and so it shows
 		//Console.WriteLine ("ContentLength: " + res2.ContentLength);
 		res2.Close ();
+#endif
 		
 		
 		// what's the limit of the cache?
@@ -148,6 +153,7 @@ public class ServicePointTest
 
 	[Test]
 	[Category ("InetAccess")]
+	[Category ("AndroidNotWorking")] // #A1 fails
 	public void EndPointBind ()
 	{
 		Uri uri = new Uri ("http://www.go-mono.com/");
@@ -163,7 +169,7 @@ public class ServicePointTest
 		};
 		req.GetResponse ().Close ();
 
-		Assert.IsTrue (called);
+		Assert.IsTrue (called, "#A1");
 
 		req = (HttpWebRequest) WebRequest.Create (uri);
 		called = false;
@@ -174,7 +180,7 @@ public class ServicePointTest
 		};
 		req.GetResponse ().Close ();
 
-		Assert.IsTrue (called);
+		Assert.IsTrue (called, "#A2");
 	}
 
 	public static void GetRequestStreamCallback (IAsyncResult asynchronousResult)