Skip to content

Commit 28a8fc5

Browse files
authored
flaky test fix - assert cluster stats on isolated node as stats is local to the node (#13383)
Signed-off-by: Rajiv Kumar Vaidyanathan <rajivkv@amazon.com>
1 parent 18aa5ad commit 28a8fc5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

server/src/internalClusterTest/java/org/opensearch/discovery/ClusterManagerDisruptionIT.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,15 @@ public void testIsolateClusterManagerAndVerifyClusterStateConsensus() throws Exc
198198
+ nodeState
199199
);
200200
}
201-
202201
}
203-
ClusterStateStats clusterStateStats = internalCluster().clusterService().getClusterManagerService().getClusterStateStats();
204-
assertTrue(clusterStateStats.getUpdateFailed() > 0);
202+
205203
});
204+
205+
ClusterStateStats clusterStateStats = internalCluster().clusterService(isolatedNode)
206+
.getClusterManagerService()
207+
.getClusterStateStats();
208+
assertTrue(clusterStateStats.getUpdateFailed() > 0);
209+
206210
}
207211

208212
/**

0 commit comments

Comments
 (0)