From f3e7f48d3fc4a5c3788922fee3d2203a03ca8b6c Mon Sep 17 00:00:00 2001 From: Mohit Godwani Date: Tue, 3 Sep 2024 12:12:51 +0530 Subject: [PATCH] Apply spotless Signed-off-by: Mohit Godwani --- .../gateway/remote/RemoteStatePublicationIT.java | 9 ++------- .../remotestore/RemoteStoreBaseIntegTestCase.java | 14 ++++++++++---- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/server/src/internalClusterTest/java/org/opensearch/gateway/remote/RemoteStatePublicationIT.java b/server/src/internalClusterTest/java/org/opensearch/gateway/remote/RemoteStatePublicationIT.java index c692f1cc3925b..708ea9ea9b08e 100644 --- a/server/src/internalClusterTest/java/org/opensearch/gateway/remote/RemoteStatePublicationIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/gateway/remote/RemoteStatePublicationIT.java @@ -141,10 +141,7 @@ public void testPublication() throws Exception { Settings settings = clusterService().getSettings(); logger.info("settings : {}", settings); for (Client client : clients()) { - ClusterStateResponse response = client.admin().cluster().prepareState().clear() - .setMetadata(true) - .setLocal(true) - .get(); + ClusterStateResponse response = client.admin().cluster().prepareState().clear().setMetadata(true).setLocal(true).get(); String refreshSetting = response.getState() .metadata() @@ -153,10 +150,8 @@ public void testPublication() throws Exception { assertEquals("10mb", refreshSetting); - // Verify context is present in metadata - assertEquals(new Context(CONTEXT_NAME), response.getState() - .metadata().indices().get(INDEX_NAME).context()); + assertEquals(new Context(CONTEXT_NAME), response.getState().metadata().indices().get(INDEX_NAME).context()); } } diff --git a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreBaseIntegTestCase.java b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreBaseIntegTestCase.java index 690b249897886..faf58a9ec82ee 100644 --- a/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreBaseIntegTestCase.java +++ b/server/src/internalClusterTest/java/org/opensearch/remotestore/RemoteStoreBaseIntegTestCase.java @@ -370,7 +370,13 @@ protected void prepareCluster(int numClusterManagerNodes, int numDataOnlyNodes, } } - protected void prepareClusterWithDefaultContext(int numClusterManagerNodes, int numDataOnlyNodes, String indices, int replicaCount, int shardCount) { + protected void prepareClusterWithDefaultContext( + int numClusterManagerNodes, + int numDataOnlyNodes, + String indices, + int replicaCount, + int shardCount + ) { internalCluster().startClusterManagerOnlyNodes(numClusterManagerNodes); // Adding context template to the cluster @@ -380,9 +386,9 @@ protected void prepareClusterWithDefaultContext(int numClusterManagerNodes, int for (String index : indices.split(",")) { // Ensure index is created with additional metadata field. - assertAcked(prepareCreate(index) - .setSettings(remoteStoreIndexSettings(replicaCount, shardCount)) - .setContext(new Context("testcontext"))); + assertAcked( + prepareCreate(index).setSettings(remoteStoreIndexSettings(replicaCount, shardCount)).setContext(new Context("testcontext")) + ); ensureYellowAndNoInitializingShards(index); ensureGreen(index);