[System] Make ServicePointTest.DnsRefreshTimeout test more reliable
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Thu, 9 Jun 2016 11:24:13 +0000 (13:24 +0200)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Thu, 9 Jun 2016 11:24:13 +0000 (13:24 +0200)
commitea4ad8118539b954ba43e4cca99f6443bd5b2e71
tree0078e30a2dc304bee704124f2f9d0c628da4864f
parent37bb54b503f3f8c948955c577687d4233e950cb5
[System] Make ServicePointTest.DnsRefreshTimeout test more reliable

We are still seeing quite rare failures of this test:

```
HostEntry should result in the same IPHostEntry object.
  Expected: same as <System.Net.IPHostEntry>
  But was:  <System.Net.IPHostEntry>

+++++++++++++++++++
STACK TRACE:
at MonoTests.System.Net.ServicePointTest.DnsRefreshTimeout () [0x00045] in /Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/mcs/class/System/Test/System.Net/ServicePointTest.cs:228
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /Users/builder/jenkins/workspace/test-mono-mainline/label/osx-i386/mcs/class/corlib/System.Reflection/MonoMethod.cs:309
```

Since the test is only checking if expiring of the cached DNS lookup works, we don't really need to use an external domain name for this
as "localhost" works just fine as well and typically doesn't trigger a DNS query which makes the test more reliable against network issues.
mcs/class/System/Test/System.Net/ServicePointTest.cs