[TEST] increase await timeout in RemoteClusterConnectionTests
We have seen an improvement when we bumped the timeout from 1s to 5s, but there are still a few failures for this tests. With this commit we bump the timeout to 10 seconds hoping it will stop all the failures.
This commit is contained in:
parent
58f3e81555
commit
17b7d2efcb
|
@ -672,7 +672,7 @@ public class RemoteClusterConnectionTests extends ESTestCase {
|
|||
AtomicReference<Exception> failReference = new AtomicReference<>();
|
||||
connection.fetchSearchShards(searchShardsRequest,
|
||||
new LatchedActionListener<>(ActionListener.wrap(reference::set, failReference::set), responseLatch));
|
||||
assertTrue(responseLatch.await(5, TimeUnit.SECONDS));
|
||||
assertTrue(responseLatch.await(10, TimeUnit.SECONDS));
|
||||
assertNull(failReference.get());
|
||||
assertNotNull(reference.get());
|
||||
ClusterSearchShardsResponse response = reference.get();
|
||||
|
@ -703,7 +703,7 @@ public class RemoteClusterConnectionTests extends ESTestCase {
|
|||
new LatchedActionListener<>(ActionListener.wrap((s) -> {
|
||||
reference.set(s);
|
||||
}, failReference::set), responseLatch));
|
||||
assertTrue(responseLatch.await(1, TimeUnit.SECONDS));
|
||||
assertTrue(responseLatch.await(10, TimeUnit.SECONDS));
|
||||
assertNotNull(failReference.get());
|
||||
assertNull(reference.get());
|
||||
assertThat(failReference.get(), instanceOf(TransportException.class));
|
||||
|
@ -716,7 +716,7 @@ public class RemoteClusterConnectionTests extends ESTestCase {
|
|||
AtomicReference<Exception> failReference = new AtomicReference<>();
|
||||
connection.fetchSearchShards(searchShardsRequest,
|
||||
new LatchedActionListener<>(ActionListener.wrap(reference::set, failReference::set), responseLatch));
|
||||
assertTrue(responseLatch.await(1, TimeUnit.SECONDS));
|
||||
assertTrue(responseLatch.await(10, TimeUnit.SECONDS));
|
||||
assertNull(failReference.get());
|
||||
assertNotNull(reference.get());
|
||||
ClusterSearchShardsResponse response = reference.get();
|
||||
|
@ -725,7 +725,7 @@ public class RemoteClusterConnectionTests extends ESTestCase {
|
|||
|
||||
//give transport service enough time to realize that the node is down, and to notify the connection listeners
|
||||
//so that RemoteClusterConnection is left with no connected nodes, hence it will retry connecting next
|
||||
assertTrue(disconnectedLatch.await(1, TimeUnit.SECONDS));
|
||||
assertTrue(disconnectedLatch.await(10, TimeUnit.SECONDS));
|
||||
|
||||
if (randomBoolean()) {
|
||||
connection.updateSkipUnavailable(false);
|
||||
|
@ -739,7 +739,7 @@ public class RemoteClusterConnectionTests extends ESTestCase {
|
|||
AtomicReference<Exception> failReference = new AtomicReference<>();
|
||||
connection.fetchSearchShards(searchShardsRequest,
|
||||
new LatchedActionListener<>(ActionListener.wrap(reference::set, failReference::set), responseLatch));
|
||||
assertTrue(responseLatch.await(1, TimeUnit.SECONDS));
|
||||
assertTrue(responseLatch.await(10, TimeUnit.SECONDS));
|
||||
assertNull(failReference.get());
|
||||
assertNotNull(reference.get());
|
||||
ClusterSearchShardsResponse response = reference.get();
|
||||
|
|
Loading…
Reference in New Issue