Skip to content

Commit dbfb860

Browse files
committed
flaky test fix - assert cluster stats on isolated node as stats is local to the node
Signed-off-by: Rajiv Kumar Vaidyanathan <rajivkv@amazon.com>
1 parent 2aad499 commit dbfb860

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,13 @@ 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).getClusterManagerService().getClusterStateStats();
206+
assertTrue(clusterStateStats.getUpdateFailed() > 0);
207+
206208
}
207209

208210
/**

0 commit comments

Comments
 (0)