Skip to content

Commit 31c88ed

Browse files
committed
Add another chec for remote_reduce start
1 parent da1612e commit 31c88ed

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/action/CrossClusterAsyncEnrichStopIT.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import static org.elasticsearch.xpack.esql.action.EsqlAsyncTestUtils.waitForCluster;
3737
import static org.hamcrest.Matchers.empty;
3838
import static org.hamcrest.Matchers.equalTo;
39+
import static org.hamcrest.Matchers.not;
3940

4041
// This tests if enrich after stop works correctly
4142
public class CrossClusterAsyncEnrichStopIT extends AbstractEnrichBasedCrossClusterTestCase {
@@ -91,6 +92,14 @@ public void testEnrichAfterStop() throws Exception {
9192
// wait until c1 is done
9293
waitForCluster(client(), "c1", asyncExecutionId);
9394
waitForCluster(client(), LOCAL_CLUSTER, asyncExecutionId);
95+
// wait until remote reduce task starts on c2
96+
assertBusy(() -> {
97+
List<TaskInfo> tasks = getDriverTasks(client(REMOTE_CLUSTER_2));
98+
List<TaskInfo> reduceTasks = tasks.stream()
99+
.filter(t -> t.status() instanceof DriverStatus ds && ds.taskDescription().equals("remote_reduce"))
100+
.toList();
101+
assertThat(reduceTasks, not(empty()));
102+
});
94103

95104
// Run the stop request
96105
var stopRequest = new AsyncStopRequest(asyncExecutionId);

0 commit comments

Comments
 (0)