diff --git a/muted-tests.yml b/muted-tests.yml index 05a25a529b7cc..93521577d7ba8 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -247,9 +247,6 @@ tests: - class: org.elasticsearch.search.profile.dfs.DfsProfilerIT method: testProfileDfs issue: https://github.com/elastic/elasticsearch/issues/119711 -- class: org.elasticsearch.upgrades.DataStreamsUpgradeIT - method: testUpgradeDataStream - issue: https://github.com/elastic/elasticsearch/issues/119717 - class: org.elasticsearch.xpack.esql.optimizer.LocalPhysicalPlanOptimizerTests method: testSingleMatchFunctionFilterPushdownWithStringValues {default} issue: https://github.com/elastic/elasticsearch/issues/119720 diff --git a/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/DataStreamsUpgradeIT.java b/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/DataStreamsUpgradeIT.java index 642ee12588a61..e0294ba3a6e2d 100644 --- a/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/DataStreamsUpgradeIT.java +++ b/x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/DataStreamsUpgradeIT.java @@ -281,18 +281,22 @@ private void upgradeDataStream(String dataStreamName, int numRolloversOnOldClust ); assertOK(statusResponse); assertThat(statusResponseMap.get("complete"), equalTo(true)); - // The number of rollovers that will have happened when we call reindex: - final int rolloversPerformedByReindex = explicitRolloverOnNewClusterCount == 0 ? 1 : 0; final int originalWriteIndex = 1; - assertThat( - statusResponseMap.get("total_indices_in_data_stream"), - equalTo(originalWriteIndex + numRolloversOnOldCluster + explicitRolloverOnNewClusterCount + rolloversPerformedByReindex) - ); if (isOriginalClusterSameMajorVersionAsCurrent()) { + assertThat( + statusResponseMap.get("total_indices_in_data_stream"), + equalTo(originalWriteIndex + numRolloversOnOldCluster + explicitRolloverOnNewClusterCount) + ); // If the original cluster was the same as this one, we don't want any indices reindexed: assertThat(statusResponseMap.get("total_indices_requiring_upgrade"), equalTo(0)); assertThat(statusResponseMap.get("successes"), equalTo(0)); } else { + // The number of rollovers that will have happened when we call reindex: + final int rolloversPerformedByReindex = explicitRolloverOnNewClusterCount == 0 ? 1 : 0; + assertThat( + statusResponseMap.get("total_indices_in_data_stream"), + equalTo(originalWriteIndex + numRolloversOnOldCluster + explicitRolloverOnNewClusterCount + rolloversPerformedByReindex) + ); /* * total_indices_requiring_upgrade is made up of: (the original write index) + numRolloversOnOldCluster. The number of * rollovers on the upgraded cluster is irrelevant since those will not be reindexed.