Remove timed latch await in listeners test
This commit removes a timed latch await in a transport client listeners test. The problem with a timed wait here is that on an overloaded machine, the test can fail because the waiting thread was not unlatched quickly enough. This makes the test unnecessarily flaky. Instead, we should wait indefinitely and simply let the test fail by the test timeout if the latch is not counted down for some reason. Closes #25760
This commit is contained in:
parent
3d3d99557d
commit
82f52b17e1
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue