diff options
author | Elliott Hughes <enh@google.com> | 2014-08-22 16:25:46 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-08-22 17:08:36 -0700 |
commit | fbc8a6098a0eebf183ee6ca0b96fc2165927a106 (patch) | |
tree | aefea11391b213601c5807ffcb8d39a08081f5cb | |
parent | ec494368f467ca5235a6a52ff6b03b97141fa17d (diff) | |
download | libcore-fbc8a6098a0eebf183ee6ca0b96fc2165927a106.zip libcore-fbc8a6098a0eebf183ee6ca0b96fc2165927a106.tar.gz libcore-fbc8a6098a0eebf183ee6ca0b96fc2165927a106.tar.bz2 |
Work around the snappily-titled ICANN "Name Collision Occurrence Management Framework".
Using a non-existent TLD is now a Bad Idea.
(cherry-pick of a7d651e95e38974fa0de19247e8341df98a0b1b1.)
Bug: 17146413
Change-Id: I6a68b4609d59a6d56ba780d03ffcf24a2759db48
-rw-r--r-- | luni/src/test/java/libcore/java/net/InetSocketAddressTest.java | 3 | ||||
-rw-r--r-- | luni/src/test/java/libcore/java/net/OldSocketTest.java | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/luni/src/test/java/libcore/java/net/InetSocketAddressTest.java b/luni/src/test/java/libcore/java/net/InetSocketAddressTest.java index 1cbcd1a..3bca8dc 100644 --- a/luni/src/test/java/libcore/java/net/InetSocketAddressTest.java +++ b/luni/src/test/java/libcore/java/net/InetSocketAddressTest.java @@ -140,13 +140,14 @@ public class InetSocketAddressTest extends TestCase { InetSocketAddress isa1 = new InetSocketAddress("localhost", 80); assertFalse(isa1.isUnresolved()); - InetSocketAddress sockAddr = new InetSocketAddress("unknown.host", 1000); + InetSocketAddress sockAddr = new InetSocketAddress("unknown.host.google.com", 1000); assertTrue(sockAddr.isUnresolved()); } public void test_getHostString() throws Exception { // When we have a hostname, we'll get it back because that doesn't cost a DNS lookup... InetSocketAddress hasHostname = InetSocketAddress.createUnresolved("some host", 1234); + assertTrue(hasHostname.isUnresolved()); assertEquals("some host", hasHostname.getHostString()); assertEquals("some host", hasHostname.getHostName()); // When we don't have a hostname, whether or not we do the reverse lookup is the difference diff --git a/luni/src/test/java/libcore/java/net/OldSocketTest.java b/luni/src/test/java/libcore/java/net/OldSocketTest.java index 033a7bf..b0125ac 100644 --- a/luni/src/test/java/libcore/java/net/OldSocketTest.java +++ b/luni/src/test/java/libcore/java/net/OldSocketTest.java @@ -95,10 +95,9 @@ public class OldSocketTest extends OldSocketTestCase { } try { - new Socket("unknown.host", 0); + new Socket("unknown.host.google.com", 0); fail("UnknownHostException was not thrown."); - } catch(UnknownHostException uhe) { - //expected + } catch (UnknownHostException expected) { } Socket socket = null; try { |