Skip to content

Commit 546e736

Browse files
author
Christoph Büscher
authored
[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 d78966c commit 546e736

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
import java.util.stream.Collectors;
6060

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

0 commit comments

Comments
 (0)