|
213 | 213 | import static org.opensearch.core.common.util.CollectionUtils.eagerPartition;
|
214 | 214 | import static org.opensearch.discovery.DiscoveryModule.DISCOVERY_SEED_PROVIDERS_SETTING;
|
215 | 215 | import static org.opensearch.discovery.SettingsBasedSeedHostsProvider.DISCOVERY_SEED_HOSTS_SETTING;
|
| 216 | +import static org.opensearch.gateway.remote.RemoteClusterStateService.REMOTE_CLUSTER_STATE_ENABLED_SETTING; |
216 | 217 | import static org.opensearch.index.IndexSettings.INDEX_DOC_ID_FUZZY_SET_ENABLED_SETTING;
|
217 | 218 | import static org.opensearch.index.IndexSettings.INDEX_DOC_ID_FUZZY_SET_FALSE_POSITIVE_PROBABILITY_SETTING;
|
218 | 219 | import static org.opensearch.index.IndexSettings.INDEX_SOFT_DELETES_RETENTION_LEASE_PERIOD_SETTING;
|
@@ -396,6 +397,8 @@ public abstract class OpenSearchIntegTestCase extends OpenSearchTestCase {
|
396 | 397 | private ReplicationType randomReplicationType;
|
397 | 398 |
|
398 | 399 | private String randomStorageType;
|
| 400 | + private Path translogRepoPath; |
| 401 | + private Path segmentRepoPath; |
399 | 402 |
|
400 | 403 | @BeforeClass
|
401 | 404 | public static void beforeClass() throws Exception {
|
@@ -690,7 +693,7 @@ protected Settings featureFlagSettings() {
|
690 | 693 | // Enabling Telemetry setting by default
|
691 | 694 | featureSettings.put(FeatureFlags.TELEMETRY_SETTING.getKey(), true);
|
692 | 695 | featureSettings.put(FeatureFlags.APPLICATION_BASED_CONFIGURATION_TEMPLATES_SETTING.getKey(), true);
|
693 |
| - |
| 696 | + featureSettings.put(FeatureFlags.REMOTE_PUBLICATION_EXPERIMENTAL, true); |
694 | 697 | return featureSettings.build();
|
695 | 698 | }
|
696 | 699 |
|
@@ -1944,6 +1947,27 @@ protected Settings nodeSettings(int nodeOrdinal) {
|
1944 | 1947 | builder.put(CLUSTER_REPLICATION_TYPE_SETTING.getKey(), randomReplicationType);
|
1945 | 1948 | }
|
1946 | 1949 | }
|
| 1950 | + |
| 1951 | + if (segmentRepoPath == null || translogRepoPath == null) { |
| 1952 | + segmentRepoPath = randomRepoPath().toAbsolutePath(); |
| 1953 | + translogRepoPath = randomRepoPath().toAbsolutePath(); |
| 1954 | + } |
| 1955 | + builder.put(remoteStoreClusterSettings("test-remote-store-repo", segmentRepoPath, "test-remote-store-repo-2", translogRepoPath)); |
| 1956 | + String routingTableRepoName = "remote-routing-repo"; |
| 1957 | + String routingTableRepoTypeAttributeKey = String.format( |
| 1958 | + Locale.getDefault(), |
| 1959 | + "node.attr." + REMOTE_STORE_REPOSITORY_TYPE_ATTRIBUTE_KEY_FORMAT, |
| 1960 | + routingTableRepoName |
| 1961 | + ); |
| 1962 | + String routingTableRepoSettingsAttributeKeyPrefix = String.format( |
| 1963 | + Locale.getDefault(), |
| 1964 | + "node.attr." + REMOTE_STORE_REPOSITORY_SETTINGS_ATTRIBUTE_KEY_PREFIX, |
| 1965 | + routingTableRepoName |
| 1966 | + ); |
| 1967 | + builder.put(REMOTE_CLUSTER_STATE_ENABLED_SETTING.getKey(), true) |
| 1968 | + .put("node.attr." + REMOTE_STORE_ROUTING_TABLE_REPOSITORY_NAME_ATTRIBUTE_KEY, routingTableRepoName) |
| 1969 | + .put(routingTableRepoTypeAttributeKey, ReloadableFsRepository.TYPE) |
| 1970 | + .put(routingTableRepoSettingsAttributeKeyPrefix + "location", segmentRepoPath); |
1947 | 1971 | return builder.build();
|
1948 | 1972 | }
|
1949 | 1973 |
|
|
0 commit comments