From 8b25a7281d395176102b379b03a4a67d802ae5d4 Mon Sep 17 00:00:00 2001 From: Parker Timmins Date: Fri, 21 Feb 2025 20:20:17 -0600 Subject: [PATCH] Fix broken test caused by setting old write index to read-only verified (#123190) #122887 set read-only on the source indices of a data stream reindex. To test behavior when the source index was already read-only, testDataStreamUpgrade sometimes set the old write index to read-only. But the rest end point for adding a read-only block always sets verifed-read-only. This caused the old write index to not need to be upgraded, resulting in an incorrect value for total_indices_requiring_upgrade --- muted-tests.yml | 4 +--- .../java/org/elasticsearch/upgrades/DataStreamsUpgradeIT.java | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/muted-tests.yml b/muted-tests.yml index 44850050c63ad..3401798707edf 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -335,9 +335,6 @@ tests: - class: org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT method: testStopQueryLocal issue: https://github.com/elastic/elasticsearch/issues/121672 -- class: org.elasticsearch.upgrades.DataStreamsUpgradeIT - method: testUpgradeDataStream - issue: https://github.com/elastic/elasticsearch/issues/123189 - class: org.elasticsearch.smoketest.DocsClientYamlTestSuiteIT method: test {yaml=reference/snapshot-restore/restore-snapshot/line_408} issue: https://github.com/elastic/elasticsearch/issues/123192 @@ -348,6 +345,7 @@ tests: method: testHistoryIsWrittenWithFailure issue: https://github.com/elastic/elasticsearch/issues/123203 + # Examples: # # Mute a single test case in a YAML test suite: 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 77ab71b5db6e3..1d320f97a41a2 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 @@ -548,9 +548,6 @@ private void upgradeDataStream(String dataStreamName, int numRolloversOnOldClust if (randomBoolean()) { closeIndex(oldIndexName); } - if (randomBoolean()) { - assertOK(client().performRequest(new Request("PUT", oldIndexName + "/_block/read_only"))); - } } Request reindexRequest = new Request("POST", "/_migration/reindex"); reindexRequest.setJsonEntity(Strings.format("""