From: Alexander Köplinger Date: Fri, 4 Mar 2016 23:09:13 +0000 (+0100) Subject: [System] Switch DNS tests to a more stable domain/IP X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=202806306b21411f7a0c9487de7e2935c7fc9d5a;p=mono.git [System] Switch DNS tests to a more stable domain/IP info.diku.dk stopped resolving today. Use Google's public DNS server instead which should be much more stable. --- diff --git a/mcs/class/System/Test/System.Net/DnsTest.cs b/mcs/class/System/Test/System.Net/DnsTest.cs index ef55ed36a6c..fe3769fd545 100644 --- a/mcs/class/System/Test/System.Net/DnsTest.cs +++ b/mcs/class/System/Test/System.Net/DnsTest.cs @@ -7,13 +7,6 @@ // (C) 2001 Mads Pultz // (C) 2003 Martin Willemoes Hansen // -// This test assumes the following: -// 1) The following Internet sites exist: -// www.go-mono.com with IP address 64.14.94.188 -// info.diku.dk with IP address 130.225.96.4 -// 2) The following DNS name does not exist: -// www.hopefullydoesnotexist.dk -// using System; using System.Collections; @@ -28,12 +21,12 @@ namespace MonoTests.System.Net [TestFixture] public class DnsTest { - private String site1Name = "jenkins.mono-project.com", - site1Dot = "162.253.133.196", - site2Name = "info.diku.dk", - site2Dot = "130.225.96.4", + private String site1Name = "google-public-dns-a.google.com", + site1Dot = "8.8.8.8", + site2Name = "google-public-dns-b.google.com", + site2Dot = "8.8.4.4", noneExistingSite = "unlikely.xamarin.com"; - private uint site1IP = 1852407392, site2IP = 2195808260; // Big-Endian + private uint site1IP = 134744072, site2IP = 134743044; // Big-Endian [Test] public void AsyncGetHostByName () @@ -44,7 +37,7 @@ namespace MonoTests.System.Net IAsyncResult async = Dns.BeginGetHostByName (site1Name, null, null); IPHostEntry entry = Dns.EndGetHostByName (async); SubTestValidIPHostEntry (entry); - Assert.IsTrue (entry.HostName == "jenkins.mono-project.com"); + Assert.IsTrue (entry.HostName == "google-public-dns-a.google.com"); } void GetHostByNameCallback (IAsyncResult ar) @@ -189,7 +182,7 @@ namespace MonoTests.System.Net [Test] public void GetHostByName () { - SubTestGetHostByName ("jenkins.mono-project.com", site1Dot); + SubTestGetHostByName (site1Name, site1Dot); SubTestGetHostByName (site2Name, site2Dot); try { var entry = Dns.GetHostByName (noneExistingSite);