diff --git a/core/src/test/java/org/elasticsearch/client/transport/TransportClientNodesServiceTests.java b/core/src/test/java/org/elasticsearch/client/transport/TransportClientNodesServiceTests.java index ed15660c85e..ad24da029e7 100644 --- a/core/src/test/java/org/elasticsearch/client/transport/TransportClientNodesServiceTests.java +++ b/core/src/test/java/org/elasticsearch/client/transport/TransportClientNodesServiceTests.java @@ -270,7 +270,7 @@ public class TransportClientNodesServiceTests extends ESTestCase { }); }, actionListener); - assertThat(latch.await(1, TimeUnit.SECONDS), equalTo(true)); + latch.await(); //there can be only either one failure that causes the request to fail straightaway or success assertThat(preSendFailures.get() + iteration.transport.failures() + iteration.transport.successes(), lessThanOrEqualTo(1));