Ignore zen2 discovery task in waitForPendingTasks (#36381)

Fixes #36380
This commit is contained in:
David Roberts 2018-12-10 11:07:02 +00:00 committed by GitHub
parent 0d9e3adc95
commit 558f4ec278
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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);
});
}
}