File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
server/src/internalClusterTest/java/org/opensearch/remotemigration Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ public void testLocalRecoveryFlowWithReplicas() throws Exception {
111111 */
112112 private void triggerRollingRestartForRemoteMigration (int replicaCount ) throws Exception {
113113 internalCluster ().startClusterManagerOnlyNodes (3 );
114- internalCluster ().startNodes (numOfNodes - 3 );
114+ internalCluster ().startDataOnlyNodes (numOfNodes - 3 );
115115
116116 // create index
117117 Settings indexSettings = Settings .builder ()
@@ -133,13 +133,16 @@ private void triggerRollingRestartForRemoteMigration(int replicaCount) throws Ex
133133 REPOSITORY_2_NAME ,
134134 translogRepoPath
135135 );
136- internalCluster ().rollingRestart (new InternalTestCluster .RestartCallback () {
137- // Update remote attributes
138- @ Override
139- public Settings onNodeStopped (String nodeName ) {
140- return remoteNodeAttributes ;
141- }
142- });
136+ // restarts only data nodes.
137+ for (String nodeName : internalCluster ().getDataNodeNames ()) {
138+ internalCluster ().restartNode (nodeName , new InternalTestCluster .RestartCallback () {
139+ // Update remote attributes
140+ @ Override
141+ public Settings onNodeStopped (String nodeName ) {
142+ return remoteNodeAttributes ;
143+ }
144+ });
145+ }
143146 ensureStableCluster (numOfNodes );
144147 ensureGreen (TimeValue .timeValueSeconds (90 ), indexName );
145148 assertEquals (internalCluster ().size (), numOfNodes );
You can’t perform that action at this time.
0 commit comments