Skip to content

Commit 073d4f3

Browse files
author
Christoph Büscher
committed
[Tests] Nudge wait time in RemoteClusterServiceTests (#33853)
This test occasionally fails in `testCollectSearchShards` waiting on what seems to be a search request to a remote cluster for one second. Given that the test fails here very rarely I suspect maybe one second is very rarely not enough so we could fix it by increasing the max wait time slightly. Closes #33852
1 parent baf28fe commit 073d4f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/test/java/org/elasticsearch/transport/RemoteClusterServiceTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
*/
1919
package org.elasticsearch.transport;
2020

21-
import java.util.function.Supplier;
2221
import org.elasticsearch.Version;
2322
import org.elasticsearch.action.ActionListener;
2423
import org.elasticsearch.action.LatchedActionListener;
@@ -56,6 +55,7 @@
5655
import java.util.concurrent.atomic.AtomicReference;
5756
import java.util.function.BiFunction;
5857
import java.util.function.Predicate;
58+
import java.util.function.Supplier;
5959

6060
import static org.hamcrest.CoreMatchers.containsString;
6161
import static org.hamcrest.CoreMatchers.instanceOf;
@@ -577,7 +577,7 @@ public void testCollectSearchShards() throws Exception {
577577
remoteClusterService.collectSearchShards(IndicesOptions.lenientExpandOpen(), "index_not_found",
578578
null, remoteIndicesByCluster,
579579
new LatchedActionListener<>(ActionListener.wrap(response::set, failure::set), latch));
580-
assertTrue(latch.await(1, TimeUnit.SECONDS));
580+
assertTrue(latch.await(2, TimeUnit.SECONDS));
581581
assertNull(response.get());
582582
assertNotNull(failure.get());
583583
assertThat(failure.get(), instanceOf(RemoteTransportException.class));

0 commit comments

Comments
 (0)