Skip to content

Commit 141ae52

Browse files
committed
fix flaky test testClusterHealthResponseWithEnsureNodeWeighedInParam
Signed-off-by: guojialiang <guojialiang.2012@bytedance.com>
1 parent e9c62bc commit 141ae52

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

server/src/internalClusterTest/java/org/opensearch/cluster/routing/WeightedRoutingIT.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,8 +717,16 @@ public void testClusterHealthResponseWithEnsureNodeWeighedInParam() throws Excep
717717
.get();
718718
assertTrue(deleteResponse.isAcknowledged());
719719

720+
ClusterHealthResponse clusterHealthResponse = client().admin()
721+
.cluster()
722+
.prepareHealth()
723+
.setWaitForNodes("4")
724+
.execute()
725+
.actionGet();
726+
assertThat(clusterHealthResponse.isTimedOut(), equalTo(false));
727+
720728
// Check local cluster health
721-
ClusterHealthResponse clusterHealthResponse = client(nodes_in_zone_c.get(0)).admin()
729+
clusterHealthResponse = client(nodes_in_zone_c.get(0)).admin()
722730
.cluster()
723731
.prepareHealth()
724732
.setLocal(true)

0 commit comments

Comments
 (0)