summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Parks <jparks@google.com>2014-12-01 16:41:01 -0600
committerJason Parks <jparks@google.com>2014-12-02 09:08:22 -0600
commit40122b34be21ad22816427c807d88a2d8fcd8b22 (patch)
tree1000783df9b628852188229d81b61701c7603db3
parent939e6a1aceff448445928ad5d815479e84e84383 (diff)
downloadlibcore-40122b34be21ad22816427c807d88a2d8fcd8b22.zip
libcore-40122b34be21ad22816427c807d88a2d8fcd8b22.tar.gz
libcore-40122b34be21ad22816427c807d88a2d8fcd8b22.tar.bz2
Fix failing connection tests.
Use local servers instead of live servers. Bug: 18575971 Change-Id: If2f736a2b5a45c713d7d0922e1c5a0b0ec9cdc4a
-rw-r--r--luni/src/test/java/libcore/java/net/OldSocketTest.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/luni/src/test/java/libcore/java/net/OldSocketTest.java b/luni/src/test/java/libcore/java/net/OldSocketTest.java
index b0125ac..80bee69 100644
--- a/luni/src/test/java/libcore/java/net/OldSocketTest.java
+++ b/luni/src/test/java/libcore/java/net/OldSocketTest.java
@@ -119,9 +119,10 @@ public class OldSocketTest extends OldSocketTestCase {
}
public void test_ConstructorLjava_lang_StringILjava_net_InetAddressI2() throws IOException {
- Socket s1 = new Socket("www.google.com", 80, null, 0);
+ int sport = startServer("Cons String,I,InetAddress,I");
+ Socket s1 = new Socket(InetAddress.getLocalHost(), sport, null, 0);
try {
- Socket s2 = new Socket("www.google.com", 80, null, s1.getLocalPort());
+ Socket s2 = new Socket(InetAddress.getLocalHost(), sport, null, s1.getLocalPort());
try {
s2.close();
} catch (IOException ignored) {