Skip to content

Commit 9300535

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 9300535

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

Lines changed: 7 additions & 3 deletions
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)