File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/tasks Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 3232
3333package org .opensearch .action .admin .cluster .tasks ;
3434
35+ import org .opensearch .action .admin .cluster .node .info .NodesInfoRequest ;
3536import org .opensearch .common .settings .Settings ;
3637import org .opensearch .gateway .GatewayService ;
3738import org .opensearch .test .InternalTestCluster ;
@@ -91,11 +92,12 @@ public void testPendingTasksWithClusterNotRecoveredBlock() throws Exception {
9192 }
9293
9394 // 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 ();
95+ NodesInfoRequest nodesInfoRequest = new NodesInfoRequest ();
96+ final int dataNodesCount = client ().admin ().cluster ().prepareNodesInfo ("data:true" ).get ().getNodes ().size ();
9597 internalCluster ().fullRestart (new InternalTestCluster .RestartCallback () {
9698 @ Override
9799 public Settings onNodeStopped (String nodeName ) {
98- return Settings .builder ().put (GatewayService .RECOVER_AFTER_DATA_NODES_SETTING .getKey (), nodeCount + 1 ).build ();
100+ return Settings .builder ().put (GatewayService .RECOVER_AFTER_DATA_NODES_SETTING .getKey (), dataNodesCount + 1 ).build ();
99101 }
100102
101103 @ Override
You can’t perform that action at this time.
0 commit comments