diff options
author | Elliott Hughes <enh@google.com> | 2014-08-23 00:15:50 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-08-23 00:15:50 +0000 |
commit | 02d5b59eee9cbc060a612070be66e6f93914b907 (patch) | |
tree | 500c64254f788837b173c1a03b10c7796b4de3b4 /luni/src | |
parent | 3b08bc4980125367384de5b59db985d08fdc2019 (diff) | |
parent | 5bd44cf9f4ea68ee648b56321665e6b644283035 (diff) | |
download | libcore-02d5b59eee9cbc060a612070be66e6f93914b907.zip libcore-02d5b59eee9cbc060a612070be66e6f93914b907.tar.gz libcore-02d5b59eee9cbc060a612070be66e6f93914b907.tar.bz2 |
am 5bd44cf9: am a7d651e9: Work around the snappily-titled ICANN "Name Collision Occurrence Management Framework".
* commit '5bd44cf9f4ea68ee648b56321665e6b644283035':
Work around the snappily-titled ICANN "Name Collision Occurrence Management Framework".
Diffstat (limited to 'luni/src')
-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 { |