From 558f4ec27820e1a50660dc1f3437422150339af0 Mon Sep 17 00:00:00 2001 From: David Roberts Date: Mon, 10 Dec 2018 11:07:02 +0000 Subject: [PATCH] Ignore zen2 discovery task in waitForPendingTasks (#36381) Fixes #36380 --- .../java/org/elasticsearch/xpack/test/rest/XPackRestIT.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x-pack/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java b/x-pack/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java index ab6289c410b..f4c96d979f1 100644 --- a/x-pack/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java +++ b/x-pack/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java @@ -9,6 +9,7 @@ import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; import org.apache.http.HttpStatus; import org.elasticsearch.ElasticsearchException; +import org.elasticsearch.action.admin.cluster.bootstrap.GetDiscoveredNodesAction; import org.elasticsearch.client.Request; import org.elasticsearch.client.Response; import org.elasticsearch.common.CheckedFunction; @@ -255,7 +256,9 @@ public class XPackRestIT extends ESClientYamlSuiteTestCase { // it could be waiting for pending tasks while monitoring is still running). ESRestTestCase.waitForPendingTasks(adminClient(), task -> { // Don't check rollup jobs because we clear them in the superclass. - return task.contains(RollupJob.NAME); + return task.contains(RollupJob.NAME) + // Also ignore the zen2 discovery task + || task.contains(GetDiscoveredNodesAction.NAME); }); } }