summaryrefslogtreecommitdiffstats
path: root/luni/src
diff options
context:
space:
mode:
Diffstat (limited to 'luni/src')
-rw-r--r--luni/src/test/java/libcore/java/net/InetSocketAddressTest.java3
-rw-r--r--luni/src/test/java/libcore/java/net/OldSocketTest.java5
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 {