From 40122b34be21ad22816427c807d88a2d8fcd8b22 Mon Sep 17 00:00:00 2001 From: Jason Parks Date: Mon, 1 Dec 2014 16:41:01 -0600 Subject: Fix failing connection tests. Use local servers instead of live servers. Bug: 18575971 Change-Id: If2f736a2b5a45c713d7d0922e1c5a0b0ec9cdc4a --- luni/src/test/java/libcore/java/net/OldSocketTest.java | 5 +++-- 1 file 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) { -- cgit v1.1