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.
[Test]
public void DnsRefreshTimeout ()
{
- const int dnsRefreshTimeout = 200;
+ const int dnsRefreshTimeout = 2000;
ServicePoint sp;
IPHostEntry host0, host1, host2;
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);