[System] Bump timeout in ServicePointTest.DnsRefreshTimeout test again
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Fri, 11 Sep 2015 20:48:13 +0000 (22:48 +0200)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Fri, 11 Sep 2015 20:48:13 +0000 (22:48 +0200)
The refresh timeout starts running before the actual DNS request is sent, which means on systems with a
slow DNS server the cached value has already timed out when the response is received, making the test fail.

Bumping the timeout to 2s should fix the test on Jenkins.

mcs/class/System/Test/System.Net/ServicePointTest.cs

index 79858202cc1cd964064aabff3d2cd834126d156c..63a6b3e52b3e2ffd2c27acab0f8c8e547e035ddc 100644 (file)
@@ -210,7 +210,7 @@ public class ServicePointTest
        [Test]
        public void DnsRefreshTimeout ()
        {
-               const int dnsRefreshTimeout = 200;
+               const int dnsRefreshTimeout = 2000;
 
                ServicePoint sp;
                IPHostEntry host0, host1, host2;
@@ -219,7 +219,7 @@ public class ServicePointTest
 
                ServicePointManager.DnsRefreshTimeout = dnsRefreshTimeout;
 
-               uri = new Uri ("http://ww.google.com/");
+               uri = new Uri ("http://www.google.com/");
                sp = ServicePointManager.FindServicePoint (uri);
 
                hostEntryProperty = typeof (ServicePoint).GetProperty ("HostEntry", BindingFlags.NonPublic | BindingFlags.Instance);