From 6c5477de861185eb89765b2e25c74a91ca9b901c Mon Sep 17 00:00:00 2001 From: Simone Bordet Date: Tue, 25 Aug 2015 18:21:03 +0200 Subject: [PATCH] Fixed randonly failing test. Sometimes the DNS was returning one IPv4 and one IPv6 address. Replacing the IPv4 one left as the only valid address the IPv6; but if IPv6 is not deployed on the network infrastructure, then that will fail too, causing the test to fail. --- .../test/java/org/eclipse/jetty/client/HttpClientTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java b/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java index 3205139f1c3..977a460b6b4 100644 --- a/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java +++ b/jetty-client/src/test/java/org/eclipse/jetty/client/HttpClientTest.java @@ -897,9 +897,9 @@ public class HttpClientTest extends AbstractHttpClientServerTest @Override public void succeeded(List result) { - // Replace the first address with an invalid address so that we - // test that the connect operation iterates over the addresses. - result.set(0, new InetSocketAddress("idontexist", 80)); + // Add as first address an invalid address so that we test + // that the connect operation iterates over the addresses. + result.add(0, new InetSocketAddress("idontexist", 80)); promise.succeeded(result); }