diff --git a/server/src/test/java/org/elasticsearch/discovery/zen/UnicastZenPingTests.java b/server/src/test/java/org/elasticsearch/discovery/zen/UnicastZenPingTests.java index fedbf02a8e8..f06ef3e7280 100644 --- a/server/src/test/java/org/elasticsearch/discovery/zen/UnicastZenPingTests.java +++ b/server/src/test/java/org/elasticsearch/discovery/zen/UnicastZenPingTests.java @@ -401,7 +401,7 @@ public class UnicastZenPingTests extends ESTestCase { Collections.singletonList("127.0.0.1"), limitPortCounts, transportService, - TimeValue.timeValueSeconds(1)); + TimeValue.timeValueSeconds(30)); assertThat(transportAddresses, hasSize(limitPortCounts)); final Set ports = new HashSet<>(); for (final TransportAddress address : transportAddresses) { @@ -445,7 +445,7 @@ public class UnicastZenPingTests extends ESTestCase { Collections.singletonList(NetworkAddress.format(loopbackAddress)), 10, transportService, - TimeValue.timeValueSeconds(1)); + TimeValue.timeValueSeconds(30)); assertThat(transportAddresses, hasSize(7)); final Set ports = new HashSet<>(); for (final TransportAddress address : transportAddresses) { @@ -496,7 +496,7 @@ public class UnicastZenPingTests extends ESTestCase { Arrays.asList(hostname), 1, transportService, - TimeValue.timeValueSeconds(1) + TimeValue.timeValueSeconds(30) ); assertThat(transportAddresses, empty()); @@ -547,7 +547,7 @@ public class UnicastZenPingTests extends ESTestCase { new TransportService(Settings.EMPTY, transport, threadPool, TransportService.NOOP_TRANSPORT_INTERCEPTOR, x -> null, null, Collections.emptySet()); closeables.push(transportService); - final TimeValue resolveTimeout = TimeValue.timeValueSeconds(randomIntBetween(1, 3)); + final TimeValue resolveTimeout = TimeValue.timeValueSeconds(randomIntBetween(3, 5)); try { final List transportAddresses = UnicastZenPing.resolveHostsLists( executorService, @@ -722,7 +722,7 @@ public class UnicastZenPingTests extends ESTestCase { Arrays.asList("127.0.0.1:9300:9300", "127.0.0.1:9301"), 1, transportService, - TimeValue.timeValueSeconds(1)); + TimeValue.timeValueSeconds(30)); assertThat(transportAddresses, hasSize(1)); // only one of the two is valid and will be used assertThat(transportAddresses.get(0).getAddress(), equalTo("127.0.0.1")); assertThat(transportAddresses.get(0).getPort(), equalTo(9301));