[System] Fix DnsTest.GetHostByName() test.
authorJonathan Pryor <jonpryor@vt.edu>
Thu, 25 Jul 2013 15:34:03 +0000 (11:34 -0400)
committerJonathan Pryor <jonpryor@vt.edu>
Thu, 25 Jul 2013 15:38:09 +0000 (11:38 -0400)
Test Case Failures:
1) MonoTests.System.Net.DnsTest.GetHostByName : Should raise a SocketException (assuming that 'www.unlikely.novell.com' does not exist)
  at MonoTests.System.Net.DnsTest.GetHostByName () [0x00089] in /Users/jon/Development/mono-HEAD/mono/mcs/class/System/Test/System.Net/DnsTest.cs:212
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00054] in /Users/jon/Development/mono-HEAD/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:230

As it happens, 'www.unlikely.novell.com' DOES exist:

$ ping www.unlikely.novell.com
PING www.unlikely.novell.com (199.101.28.20): 56 data bytes
64 bytes from 199.101.28.20: icmp_seq=0 ttl=57 time=29.399 ms

Apparently it's due to the "www." prefix; remove "www." and the site
isn't found, as expected:

$ ping unlikely.novell.com
ping: cannot resolve unlikely.novell.com: Unknown host

Update DnsTest.noneExistingSite so that the DnsTest.GetHostByName()
test passes.

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

index 611df7bf51450b09604ce05414ece68ad2b705e9..44797640651c31745e21743823130c9c33b91ec3 100644 (file)
@@ -32,7 +32,7 @@ namespace MonoTests.System.Net
                        site1Dot = "96.126.105.110",\r
                        site2Name = "info.diku.dk",\r
                        site2Dot = "130.225.96.4",\r
-                       noneExistingSite = "www.unlikely.novell.com";\r
+                       noneExistingSite = "unlikely.xamarin.com";\r
                private uint site1IP = 1852407392, site2IP = 2195808260; // Big-Endian\r
 \r
                [Test]\r