Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public void testLocalRecoveryFlowWithReplicas() throws Exception {
*/
private void triggerRollingRestartForRemoteMigration(int replicaCount) throws Exception {
internalCluster().startClusterManagerOnlyNodes(3);
internalCluster().startNodes(numOfNodes - 3);
internalCluster().startDataOnlyNodes(numOfNodes - 3);

// create index
Settings indexSettings = Settings.builder()
Expand All @@ -133,13 +133,16 @@ private void triggerRollingRestartForRemoteMigration(int replicaCount) throws Ex
REPOSITORY_2_NAME,
translogRepoPath
);
internalCluster().rollingRestart(new InternalTestCluster.RestartCallback() {
// Update remote attributes
@Override
public Settings onNodeStopped(String nodeName) {
return remoteNodeAttributes;
}
});
// restarts only data nodes.
for (String nodeName : internalCluster().getDataNodeNames()) {
internalCluster().restartNode(nodeName, new InternalTestCluster.RestartCallback() {
// Update remote attributes
@Override
public Settings onNodeStopped(String nodeName) {
return remoteNodeAttributes;
}
});
}
ensureStableCluster(numOfNodes);
ensureGreen(TimeValue.timeValueSeconds(90), indexName);
assertEquals(internalCluster().size(), numOfNodes);
Expand Down
Loading