[System] Switch DNS tests to a more stable domain/IP
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Fri, 4 Mar 2016 23:09:13 +0000 (00:09 +0100)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Fri, 4 Mar 2016 23:09:13 +0000 (00:09 +0100)
info.diku.dk stopped resolving today. Use Google's public DNS server instead which should be much more stable.

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

index ef55ed36a6c6d957ad9f2381265eb32e405db278..fe3769fd5455e49f1795d6cd89d16be27f12fc1a 100644 (file)
@@ -7,13 +7,6 @@
 // (C) 2001 Mads Pultz\r
 // (C) 2003 Martin Willemoes Hansen\r
 // \r
-// This test assumes the following:\r
-// 1) The following Internet sites exist:\r
-//        www.go-mono.com with IP address 64.14.94.188\r
-//        info.diku.dk with IP address 130.225.96.4\r
-// 2) The following DNS name does not exist:\r
-//        www.hopefullydoesnotexist.dk\r
-//\r
 \r
 using System;\r
 using System.Collections;\r
@@ -28,12 +21,12 @@ namespace MonoTests.System.Net
        [TestFixture]\r
        public class DnsTest\r
        {\r
-               private String site1Name = "jenkins.mono-project.com",\r
-                       site1Dot = "162.253.133.196",\r
-                       site2Name = "info.diku.dk",\r
-                       site2Dot = "130.225.96.4",\r
+               private String site1Name = "google-public-dns-a.google.com",\r
+                       site1Dot = "8.8.8.8",\r
+                       site2Name = "google-public-dns-b.google.com",\r
+                       site2Dot = "8.8.4.4",\r
                        noneExistingSite = "unlikely.xamarin.com";\r
-               private uint site1IP = 1852407392, site2IP = 2195808260; // Big-Endian\r
+               private uint site1IP = 134744072, site2IP = 134743044; // Big-Endian\r
 \r
                [Test]\r
                public void AsyncGetHostByName ()\r
@@ -44,7 +37,7 @@ namespace MonoTests.System.Net
                        IAsyncResult async = Dns.BeginGetHostByName (site1Name, null, null);\r
                        IPHostEntry entry = Dns.EndGetHostByName (async);\r
                        SubTestValidIPHostEntry (entry);\r
-                       Assert.IsTrue (entry.HostName == "jenkins.mono-project.com");\r
+                       Assert.IsTrue (entry.HostName == "google-public-dns-a.google.com");\r
                }\r
 \r
                void GetHostByNameCallback (IAsyncResult ar)\r
@@ -189,7 +182,7 @@ namespace MonoTests.System.Net
                [Test]\r
                public void GetHostByName ()\r
                {\r
-                       SubTestGetHostByName ("jenkins.mono-project.com", site1Dot);\r
+                       SubTestGetHostByName (site1Name, site1Dot);\r
                        SubTestGetHostByName (site2Name, site2Dot);\r
                        try {\r
                                var entry = Dns.GetHostByName (noneExistingSite);\r