Skip to content

Commit bad652b

Browse files
authored
Fix Flaky Test testPendingTasksWithClusterNotRecoveredBlock (#17397)
Signed-off-by: kkewwei <kewei.11@bytedance.com> Signed-off-by: kkewwei <kkewwei@163.com>
1 parent 10fa39d commit bad652b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/tasks/PendingTasksBlocksIT.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ public void testPendingTasksWithClusterNotRecoveredBlock() throws Exception {
9191
}
9292

9393
// restart the cluster but prevent it from performing state recovery
94-
final int nodeCount = client().admin().cluster().prepareNodesInfo("data:true", "cluster_manager:true").get().getNodes().size();
94+
final int dataNodesCount = client().admin().cluster().prepareNodesInfo("data:true").get().getNodes().size();
9595
internalCluster().fullRestart(new InternalTestCluster.RestartCallback() {
9696
@Override
9797
public Settings onNodeStopped(String nodeName) {
98-
return Settings.builder().put(GatewayService.RECOVER_AFTER_DATA_NODES_SETTING.getKey(), nodeCount + 1).build();
98+
return Settings.builder().put(GatewayService.RECOVER_AFTER_DATA_NODES_SETTING.getKey(), dataNodesCount + 1).build();
9999
}
100100

101101
@Override

0 commit comments

Comments
 (0)