From 459d00bf0542b0b4e8c6dae344924e4250103918 Mon Sep 17 00:00:00 2001 From: Vinay Krishna Pudyodu Date: Wed, 15 Jan 2025 15:39:25 -0800 Subject: [PATCH] Fixed integration tests Signed-off-by: Vinay Krishna Pudyodu --- .../metadata/AutoExpandWithSearchReplicaIT.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/server/src/internalClusterTest/java/org/opensearch/cluster/metadata/AutoExpandWithSearchReplicaIT.java b/server/src/internalClusterTest/java/org/opensearch/cluster/metadata/AutoExpandWithSearchReplicaIT.java index 001a7429a9f6b..8d74db40c47d8 100644 --- a/server/src/internalClusterTest/java/org/opensearch/cluster/metadata/AutoExpandWithSearchReplicaIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/cluster/metadata/AutoExpandWithSearchReplicaIT.java @@ -14,15 +14,31 @@ import org.opensearch.indices.replication.common.ReplicationType; import org.opensearch.test.OpenSearchIntegTestCase; +import java.nio.file.Path; + public class AutoExpandWithSearchReplicaIT extends OpenSearchIntegTestCase { private static final String INDEX_NAME = "test-idx-1"; + private static final String REPOSITORY_NAME = "test-remote-store-repo"; + + private Path absolutePath; @Override protected Settings featureFlagSettings() { return Settings.builder().put(super.featureFlagSettings()).put(FeatureFlags.READER_WRITER_SPLIT_EXPERIMENTAL, true).build(); } + @Override + protected Settings nodeSettings(int nodeOrdinal) { + if (absolutePath == null) { + absolutePath = randomRepoPath().toAbsolutePath(); + } + return Settings.builder() + .put(super.nodeSettings(nodeOrdinal)) + .put(remoteStoreClusterSettings(REPOSITORY_NAME, absolutePath)) + .build(); + } + public void testEnableAutoExpandWhenSearchReplicaActive() { internalCluster().startDataOnlyNodes(3); createIndex(