Skip to content

Commit

Permalink
Fixing upgrade test when the original cluster is the current version
Browse files Browse the repository at this point in the history
  • Loading branch information
masseyke committed Dec 17, 2024
1 parent bc4c3d8 commit fa3db8e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,12 @@ private void performUpgradedClusterOperations(String dataStreamName, int numRoll
);
assertOK(statusResponse);
assertThat(statusResponseMap.get("complete"), equalTo(true));
assertThat(statusResponseMap.get("successes"), equalTo(numRollovers + 1));
if (isOriginalClusterCurrent()) {
// If the original cluster was the same as this one, we don't want any indices reindexed:
assertThat(statusResponseMap.get("successes"), equalTo(0));
} else {
assertThat(statusResponseMap.get("successes"), equalTo(numRollovers + 1));
}
}, 60, TimeUnit.SECONDS);
Request cancelRequest = new Request("POST", "_migration/reindex/" + dataStreamName + "/_cancel");
Response cancelResponse = client().performRequest(cancelRequest);
Expand Down

0 comments on commit fa3db8e

Please sign in to comment.