Merge pull request #2799 from BrzVlad/fix-conc-card-clean
[mono.git] / mcs / class / System / Test / System.Net / DnsTest.cs
index 611df7bf51450b09604ce05414ece68ad2b705e9..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 = "mono-project.com",\r
-                       site1Dot = "96.126.105.110",\r
-                       site2Name = "info.diku.dk",\r
-                       site2Dot = "130.225.96.4",\r
-                       noneExistingSite = "www.unlikely.novell.com";\r
-               private uint site1IP = 1852407392, site2IP = 2195808260; // Big-Endian\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 = 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 == "www.mono-project.com" || entry.HostName == "mono-project.com");\r
+                       Assert.IsTrue (entry.HostName == "google-public-dns-a.google.com");\r
                }\r
 \r
                void GetHostByNameCallback (IAsyncResult ar)\r
@@ -72,7 +65,6 @@ namespace MonoTests.System.Net
                        SubTestValidIPHostEntry (h);\r
                }\r
 \r
-#if NET_2_0\r
                [Test]\r
                public void BeginGetHostAddresses_HostNameOrAddress_Null ()\r
                {\r
@@ -179,7 +171,6 @@ namespace MonoTests.System.Net
                                Assert.AreEqual ("hostNameOrAddress", ex.ParamName, "#B5");\r
                        }\r
                }\r
-#endif\r
 \r
                [Test]\r
                public void GetHostName ()\r
@@ -191,7 +182,7 @@ namespace MonoTests.System.Net
                [Test]\r
                public void GetHostByName ()\r
                {\r
-                       SubTestGetHostByName ("www.mono-project.com", site1Dot);\r
+                       SubTestGetHostByName (site1Name, site1Dot);\r
                        SubTestGetHostByName (site2Name, site2Dot);\r
                        try {\r
                                var entry = Dns.GetHostByName (noneExistingSite);\r
@@ -252,9 +243,6 @@ namespace MonoTests.System.Net
 \r
                [Test]\r
                [ExpectedException (typeof (SocketException))]\r
-#if TARGET_JVM\r
-               [Ignore ("Ignore failures in Sys.Net")]\r
-#endif\r
                public void GetHostByAddressString2 ()\r
                {\r
                        Dns.GetHostByAddress ("123.255.23");\r