From 12db64ba77ce43626e67f56eb2643beba418990a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 25 Apr 2024 18:52:00 +0000 Subject: [PATCH] flaky test fix - assert cluster stats on isolated node as stats is local to the node (#13383) Signed-off-by: Rajiv Kumar Vaidyanathan (cherry picked from commit 28a8fc51b48c1fbc838e48687843b051de5075ee) Signed-off-by: github-actions[bot] --- .../discovery/ClusterManagerDisruptionIT.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/server/src/internalClusterTest/java/org/opensearch/discovery/ClusterManagerDisruptionIT.java b/server/src/internalClusterTest/java/org/opensearch/discovery/ClusterManagerDisruptionIT.java index 9bd924de5d9c7..29ff14e427780 100644 --- a/server/src/internalClusterTest/java/org/opensearch/discovery/ClusterManagerDisruptionIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/discovery/ClusterManagerDisruptionIT.java @@ -197,11 +197,15 @@ public void testIsolateClusterManagerAndVerifyClusterStateConsensus() throws Exc + nodeState ); } - } - ClusterStateStats clusterStateStats = internalCluster().clusterService().getClusterManagerService().getClusterStateStats(); - assertTrue(clusterStateStats.getUpdateFailed() > 0); + }); + + ClusterStateStats clusterStateStats = internalCluster().clusterService(isolatedNode) + .getClusterManagerService() + .getClusterStateStats(); + assertTrue(clusterStateStats.getUpdateFailed() > 0); + } /**