Skip to content

Commit

Permalink
[test] Always assume that the old cluster support replication of clos…
Browse files Browse the repository at this point in the history
…ed indices (elastic#114314)

Support for replicating closed indices was added in elastic#39506 (7.1.0), we can expect the the cluster always supports replication of closed indices in 8.0/9.0
  • Loading branch information
arteam authored and jfreden committed Nov 4, 2024
1 parent b3b2e61 commit 247e116
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.elasticsearch.common.xcontent.support.XContentMapValues;
import org.elasticsearch.core.Booleans;
import org.elasticsearch.core.CheckedFunction;
import org.elasticsearch.core.UpdateForV9;
import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.IndexVersion;
import org.elasticsearch.index.IndexVersions;
Expand Down Expand Up @@ -1203,15 +1202,8 @@ public void testClosedIndices() throws Exception {
closeIndex(index);
}

@UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_INDEXING) // This check can be removed (always assume true)
var originalClusterSupportsReplicationOfClosedIndices = oldClusterHasFeature(RestTestLegacyFeatures.REPLICATION_OF_CLOSED_INDICES);

if (originalClusterSupportsReplicationOfClosedIndices) {
ensureGreenLongWait(index);
assertClosedIndex(index, true);
} else {
assertClosedIndex(index, false);
}
ensureGreenLongWait(index);
assertClosedIndex(index, true);

if (isRunningAgainstOldCluster() == false) {
openIndex(index);
Expand Down

0 comments on commit 247e116

Please sign in to comment.