From 9f59e2b9dcb2d49a00cbcf091e02094a5b3becb0 Mon Sep 17 00:00:00 2001 From: Shivansh Arora Date: Tue, 1 Oct 2024 12:08:07 +0530 Subject: [PATCH] fix spotless Signed-off-by: Shivansh Arora --- .../remote/RemotePublicationConfigurationIT.java | 11 ++++++++--- .../org/opensearch/test/OpenSearchIntegTestCase.java | 6 +----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/server/src/internalClusterTest/java/org/opensearch/gateway/remote/RemotePublicationConfigurationIT.java b/server/src/internalClusterTest/java/org/opensearch/gateway/remote/RemotePublicationConfigurationIT.java index 0cbb0b87f28a7..98859f517aad4 100644 --- a/server/src/internalClusterTest/java/org/opensearch/gateway/remote/RemotePublicationConfigurationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/gateway/remote/RemotePublicationConfigurationIT.java @@ -8,7 +8,6 @@ package org.opensearch.gateway.remote; -import org.junit.Assert; import org.opensearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest; import org.opensearch.common.settings.Settings; import org.opensearch.plugins.Plugin; @@ -19,6 +18,7 @@ import org.opensearch.test.InternalSettingsPlugin; import org.opensearch.test.OpenSearchIntegTestCase; import org.opensearch.test.transport.MockTransportService; +import org.junit.Assert; import org.junit.Before; import java.util.Collection; @@ -130,8 +130,13 @@ public void testRemoteClusterStateServiceNotInitialized_WhenNodeAttributesNotPre } public void testServiceInitialized_WhenNodeAttributesPresent() { - internalCluster().startClusterManagerOnlyNode(buildRemoteStateNodeAttributes(REPOSITORY_NAME, segmentRepoPath, ReloadableFsRepository.TYPE)); - internalCluster().startDataOnlyNodes(2, buildRemoteStateNodeAttributes(REPOSITORY_NAME, segmentRepoPath, ReloadableFsRepository.TYPE)); + internalCluster().startClusterManagerOnlyNode( + buildRemoteStateNodeAttributes(REPOSITORY_NAME, segmentRepoPath, ReloadableFsRepository.TYPE) + ); + internalCluster().startDataOnlyNodes( + 2, + buildRemoteStateNodeAttributes(REPOSITORY_NAME, segmentRepoPath, ReloadableFsRepository.TYPE) + ); ensureStableCluster(3); ensureGreen(); diff --git a/test/framework/src/main/java/org/opensearch/test/OpenSearchIntegTestCase.java b/test/framework/src/main/java/org/opensearch/test/OpenSearchIntegTestCase.java index b70301e7ce541..e27ff311c06f6 100644 --- a/test/framework/src/main/java/org/opensearch/test/OpenSearchIntegTestCase.java +++ b/test/framework/src/main/java/org/opensearch/test/OpenSearchIntegTestCase.java @@ -2795,11 +2795,7 @@ public static Settings buildRemoteStoreNodeAttributes( ); } - public static Settings buildRemoteStateNodeAttributes( - String stateRepoName, - Path stateRepoPath, - String stateRepoType - ) { + public static Settings buildRemoteStateNodeAttributes(String stateRepoName, Path stateRepoPath, String stateRepoType) { String stateRepoTypeAttributeKey = String.format( Locale.getDefault(), "node.attr." + REMOTE_STORE_REPOSITORY_TYPE_ATTRIBUTE_KEY_FORMAT,