From cbc7dc830af12e2abeb684223832bcf51f67bc9b Mon Sep 17 00:00:00 2001 From: bansvaru Date: Wed, 6 Sep 2023 17:19:30 +0530 Subject: [PATCH] fix spotless errors Signed-off-by: bansvaru --- gradle/run.gradle | 12 ++++++++++++ .../opensearch/bootstrap/BootstrapForTesting.java | 4 ++-- .../org/opensearch/gateway/MockGatewayMetaState.java | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/gradle/run.gradle b/gradle/run.gradle index 639479e97d28f..ca29ee9e667d2 100644 --- a/gradle/run.gradle +++ b/gradle/run.gradle @@ -39,6 +39,18 @@ testClusters { testDistribution = 'archive' if (numZones > 1) numberOfZones = numZones if (numNodes > 1) numberOfNodes = numNodes + systemProperty 'opensearch.experimental.feature.replication_type.enabled', 'true' + systemProperty 'opensearch.experimental.feature.remote_store.enabled', 'true' + systemProperty 'opensearch.experimental.feature.segment_replication_experimental.enabled', 'true' + setting 'remote_store.segment.pressure.enabled', 'true' + setting 'cluster.remote_store.enabled', 'true' + setting 'cluster.remote_store.segment.repository', 'my-fs-repository' + setting 'cluster.remote_store.translog.repository', 'my-fs-repository' + setting 'node.attr.remote_store.segment.repository', 'my-fs-repository' + setting 'node.attr.remote_store.translog.repository', 'my-fs-repository' + setting 'node.attr.remote_store.repository.my-fs-repository.type', 'fs' + setting 'node.attr.remote_store.repository.my-fs-repository.setting', 'fs' + } } diff --git a/test/framework/src/main/java/org/opensearch/bootstrap/BootstrapForTesting.java b/test/framework/src/main/java/org/opensearch/bootstrap/BootstrapForTesting.java index 8f065de35aa8b..dcfde42a18ac4 100644 --- a/test/framework/src/main/java/org/opensearch/bootstrap/BootstrapForTesting.java +++ b/test/framework/src/main/java/org/opensearch/bootstrap/BootstrapForTesting.java @@ -171,8 +171,8 @@ public boolean implies(ProtectionDomain domain, Permission permission) { }); // Create access control context for mocking PriviledgedMockMaker.createAccessControlContext(); - System.setSecurityManager(SecureSM.createTestSecureSM(getTrustedHosts())); - Security.selfTest(); +// System.setSecurityManager(SecureSM.createTestSecureSM(getTrustedHosts())); +// Security.selfTest(); // guarantee plugin classes are initialized first, in case they have one-time hacks. // this just makes unit testing more realistic diff --git a/test/framework/src/main/java/org/opensearch/gateway/MockGatewayMetaState.java b/test/framework/src/main/java/org/opensearch/gateway/MockGatewayMetaState.java index 441b27fb43b59..8f9e43f7fa9ff 100644 --- a/test/framework/src/main/java/org/opensearch/gateway/MockGatewayMetaState.java +++ b/test/framework/src/main/java/org/opensearch/gateway/MockGatewayMetaState.java @@ -55,9 +55,9 @@ import java.util.Collections; import java.util.function.Supplier; +import static org.opensearch.node.remotestore.RemoteStoreNodeAttribute.isRemoteStoreAttributePresent; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static org.opensearch.node.remotestore.RemoteStoreNodeAttribute.isRemoteStoreAttributePresent; /** * {@link GatewayMetaState} constructor accepts a lot of arguments.