Skip to content

Commit 558f4ec

Browse files
authored
Ignore zen2 discovery task in waitForPendingTasks (#36381)
Fixes #36380
1 parent 0d9e3ad commit 558f4ec

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

x-pack/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import org.apache.http.HttpStatus;
1111
import org.elasticsearch.ElasticsearchException;
12+
import org.elasticsearch.action.admin.cluster.bootstrap.GetDiscoveredNodesAction;
1213
import org.elasticsearch.client.Request;
1314
import org.elasticsearch.client.Response;
1415
import org.elasticsearch.common.CheckedFunction;
@@ -255,7 +256,9 @@ public void cleanup() throws Exception {
255256
// it could be waiting for pending tasks while monitoring is still running).
256257
ESRestTestCase.waitForPendingTasks(adminClient(), task -> {
257258
// Don't check rollup jobs because we clear them in the superclass.
258-
return task.contains(RollupJob.NAME);
259+
return task.contains(RollupJob.NAME)
260+
// Also ignore the zen2 discovery task
261+
|| task.contains(GetDiscoveredNodesAction.NAME);
259262
});
260263
}
261264
}

0 commit comments

Comments
 (0)