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.
This commit is contained in:
Simone Bordet 2015-08-25 18:21:03 +02:00
parent ef9724f448
commit 6c5477de86
1 changed files with 3 additions and 3 deletions

View File

@ -897,9 +897,9 @@ public class HttpClientTest extends AbstractHttpClientServerTest
@Override
public void succeeded(List<InetSocketAddress> 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);
}