diff --git a/muted-tests.yml b/muted-tests.yml index dfc6a753d478b..012ddbf93a0dd 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -458,9 +458,6 @@ tests: - class: org.elasticsearch.xpack.search.CrossClusterAsyncSearchIT method: testCancellationViaTimeoutWithAllowPartialResultsSetToFalse issue: https://github.com/elastic/elasticsearch/issues/131248 -- class: org.elasticsearch.action.admin.cluster.node.tasks.CancellableTasksIT - method: testRemoveBanParentsOnDisconnect - issue: https://github.com/elastic/elasticsearch/issues/131562 - class: org.elasticsearch.xpack.esql.action.CrossClusterQueryWithPartialResultsIT method: testPartialResults issue: https://github.com/elastic/elasticsearch/issues/131481 diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksIT.java index 3f3ee0c5598f9..8f9530599e6d5 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksIT.java @@ -363,6 +363,10 @@ public void testRemoveBanParentsOnDisconnect() throws Exception { allowEntireRequest(rootRequest); cancelFuture.actionGet(); ensureBansAndCancellationsConsistency(); + // This method will call the cluster health API with wait_for_tasks set to Priority#LANGUID. This will ensure that all tasks + // currently submitted to the master service (included re-election after a disconnect) are processed before returning. This + // ensures cluster stability for the post-test consistency checks. + ensureStableCluster(nodes.size()); } }