Commit 40122b34 authored by Jason Parks's avatar Jason Parks
Browse files

Fix failing connection tests.

Use local servers instead of live servers.

Bug: 18575971
Change-Id: If2f736a2b5a45c713d7d0922e1c5a0b0ec9cdc4a
parent 939e6a1a
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment