Skip to content

Commit 8b25a72

Browse files
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
1 parent 7cbd305 commit 8b25a72

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

muted-tests.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,6 @@ tests:
335335
- class: org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT
336336
method: testStopQueryLocal
337337
issue: https://github.com/elastic/elasticsearch/issues/121672
338-
- class: org.elasticsearch.upgrades.DataStreamsUpgradeIT
339-
method: testUpgradeDataStream
340-
issue: https://github.com/elastic/elasticsearch/issues/123189
341338
- class: org.elasticsearch.smoketest.DocsClientYamlTestSuiteIT
342339
method: test {yaml=reference/snapshot-restore/restore-snapshot/line_408}
343340
issue: https://github.com/elastic/elasticsearch/issues/123192
@@ -348,6 +345,7 @@ tests:
348345
method: testHistoryIsWrittenWithFailure
349346
issue: https://github.com/elastic/elasticsearch/issues/123203
350347

348+
351349
# Examples:
352350
#
353351
# Mute a single test case in a YAML test suite:

x-pack/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/DataStreamsUpgradeIT.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -548,9 +548,6 @@ private void upgradeDataStream(String dataStreamName, int numRolloversOnOldClust
548548
if (randomBoolean()) {
549549
closeIndex(oldIndexName);
550550
}
551-
if (randomBoolean()) {
552-
assertOK(client().performRequest(new Request("PUT", oldIndexName + "/_block/read_only")));
553-
}
554551
}
555552
Request reindexRequest = new Request("POST", "/_migration/reindex");
556553
reindexRequest.setJsonEntity(Strings.format("""

0 commit comments

Comments
 (0)