handle stupid networks

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1331 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2010-03-03 13:35:47 +00:00
parent bb311d8970
commit c53e8f4c39
1 changed files with 9 additions and 2 deletions

View File

@ -70,7 +70,7 @@ public class ConnectionTest extends TestCase
CountDownLatch latch = new CountDownLatch(1);
HttpExchange exchange = new ConnectionExchange(latch);
// Using a IP address has a different behavior than using a host name
exchange.setAddress(new Address("1.2.3.4", 8080));
exchange.setAddress(new Address("127.0.0.1", 1));
exchange.setURI("/");
httpClient.send(exchange);
@ -99,7 +99,7 @@ public class ConnectionTest extends TestCase
CountDownLatch latch = new CountDownLatch(1);
HttpExchange exchange = new ConnectionExchange(latch);
// Using a IP address has a different behavior than using a host name
exchange.setAddress(new Address("1.2.3.4", 8080));
exchange.setAddress(new Address("127.0.0.1", 1));
exchange.setURI("/");
httpClient.send(exchange);
@ -187,5 +187,12 @@ public class ConnectionTest extends TestCase
if (latch!=null)
latch.countDown();
}
@Override
protected void onException(Throwable x)
{
if (latch!=null)
latch.countDown();
}
}
}