Imported Upstream version 3.10.0

Former-commit-id: 172c8e3c300b39d5785c7a3e8dfb08ebdbc1a99b
This commit is contained in:
Jo Shields
2014-10-04 11:27:48 +01:00
parent fe777c5c82
commit 8b9b85e7f5
970 changed files with 20242 additions and 31308 deletions

View File

@ -35,9 +35,6 @@ public class ServicePointTest
[Test]
[Category ("InetAccess")]
#if TARGET_JVM
[Ignore ("Unsupported - ServicePointManager.FindServicePoint")]
#endif
public void All ()
{
ServicePoint p = ServicePointManager.FindServicePoint (new Uri ("mailto:xx@yyy.com"));
@ -119,9 +116,6 @@ public class ServicePointTest
[Test]
[Category ("InetAccess")]
#if TARGET_JVM
[Ignore ("The System.Net.ServicePointManager.FindServicePoint(Uri) is not supported")]
#endif
public void ConnectionLimit ()
{
// the default is already 2, just in case it isn't..
@ -155,9 +149,6 @@ public class ServicePointTest
#if NET_2_0
[Test]
[Category ("InetAccess")]
#if TARGET_JVM
[Ignore ("The System.Net.ServicePointManager.FindServicePoint(Uri) is not supported")]
#endif
public void EndPointBind ()
{
Uri uri = new Uri ("http://www.go-mono.com/");
@ -166,26 +157,22 @@ public class ServicePointTest
HttpWebRequest req = (HttpWebRequest) WebRequest.Create (uri);
bool called = false;
#if !TARGET_JVM
sp.BindIPEndPointDelegate = delegate {
Assert.IsTrue (!called);
called = true;
return null;
};
#endif
req.GetResponse ().Close ();
Assert.IsTrue (called);
req = (HttpWebRequest) WebRequest.Create (uri);
called = false;
#if !TARGET_JVM
sp.BindIPEndPointDelegate = delegate(ServicePoint point, IPEndPoint remote, int times) {
Assert.IsTrue (times < 5);
called = true;
return new IPEndPoint(IPAddress.Parse("0.0.0.0"), 12345 + times);
};
#endif
req.GetResponse ().Close ();
Assert.IsTrue (called);