From d6e1883be5125e99b7accbd2e3413b5caccb98c2 Mon Sep 17 00:00:00 2001 From: Dianna Hohensee Date: Thu, 24 Jul 2025 09:14:46 -0700 Subject: [PATCH 1/2] Stabilize CancellableTasksIT#testRemoveBanParentsOnDisconnect Ensure that the cluster has a stably elected master node when the test completes so that the post-test tear-down check for cluster state consistency can succeed. Closes #131562 --- muted-tests.yml | 3 --- .../action/admin/cluster/node/tasks/CancellableTasksIT.java | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/muted-tests.yml b/muted-tests.yml index 054ca8e7d35a1..66c0f49acc6db 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -473,9 +473,6 @@ tests: - class: org.elasticsearch.xpack.esql.qa.multi_node.GenerativeIT method: test issue: https://github.com/elastic/elasticsearch/issues/131508 -- 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()); } } From b28fd422c282da3a5c33d9b6122961cd8883edc2 Mon Sep 17 00:00:00 2001 From: Dianna Hohensee Date: Fri, 1 Aug 2025 11:22:38 -0700 Subject: [PATCH 2/2] fix merge --- muted-tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/muted-tests.yml b/muted-tests.yml index 1992a65eb4b66..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.xpack.esql.qa.multi_node.GenerativeIT - method: test - issue: https://github.com/elastic/elasticsearch/issues/131508 - class: org.elasticsearch.xpack.esql.action.CrossClusterQueryWithPartialResultsIT method: testPartialResults issue: https://github.com/elastic/elasticsearch/issues/131481