From 57b4ddb4ab5d4f7fcb0bc80cdad8077c1f298130 Mon Sep 17 00:00:00 2001 From: bansvaru Date: Mon, 4 Sep 2023 23:57:44 +0530 Subject: [PATCH] fix compile issues Signed-off-by: bansvaru --- server/src/main/java/org/opensearch/node/Node.java | 3 ++- .../gateway/GatewayMetaStatePersistedStateTests.java | 3 ++- .../gateway/remote/RemoteClusterStateServiceTests.java | 8 ++++---- .../java/org/opensearch/gateway/MockGatewayMetaState.java | 4 +++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/server/src/main/java/org/opensearch/node/Node.java b/server/src/main/java/org/opensearch/node/Node.java index fdf8b616ccb6c..3565121f55aca 100644 --- a/server/src/main/java/org/opensearch/node/Node.java +++ b/server/src/main/java/org/opensearch/node/Node.java @@ -682,7 +682,8 @@ protected Node( repositoriesServiceReference::get, settings, clusterService.getClusterSettings(), - threadPool::preciseRelativeTimeInNanos + threadPool::preciseRelativeTimeInNanos, + threadPool ); } else { remoteClusterStateService = null; diff --git a/server/src/test/java/org/opensearch/gateway/GatewayMetaStatePersistedStateTests.java b/server/src/test/java/org/opensearch/gateway/GatewayMetaStatePersistedStateTests.java index c293768151fa4..ccb9cd6a9e44a 100644 --- a/server/src/test/java/org/opensearch/gateway/GatewayMetaStatePersistedStateTests.java +++ b/server/src/test/java/org/opensearch/gateway/GatewayMetaStatePersistedStateTests.java @@ -458,7 +458,8 @@ public void testDataOnlyNodePersistence() throws Exception { ), settings, new ClusterSettings(settings, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS), - () -> 0L + () -> 0L, + new TestThreadPool(getClass().getName()) ); } else { return null; diff --git a/server/src/test/java/org/opensearch/gateway/remote/RemoteClusterStateServiceTests.java b/server/src/test/java/org/opensearch/gateway/remote/RemoteClusterStateServiceTests.java index 4d108cc5ef9dd..ee631819ed518 100644 --- a/server/src/test/java/org/opensearch/gateway/remote/RemoteClusterStateServiceTests.java +++ b/server/src/test/java/org/opensearch/gateway/remote/RemoteClusterStateServiceTests.java @@ -85,8 +85,8 @@ public void setup() { repositoriesServiceSupplier, settings, new ClusterSettings(settings, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS), - new TestThreadPool(getClass().getName()), - () -> 0L + () -> 0L, + new TestThreadPool(getClass().getName()) ); } @@ -105,8 +105,8 @@ public void testFailInitializationWhenRemoteStateDisabled() throws IOException { repositoriesServiceSupplier, settings, new ClusterSettings(settings, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS), - new TestThreadPool(getClass().getName()), - () -> 0L + () -> 0L, + new TestThreadPool(getClass().getName()) ) ); } 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 14d646cf84a0a..2cb552235e6a6 100644 --- a/test/framework/src/main/java/org/opensearch/gateway/MockGatewayMetaState.java +++ b/test/framework/src/main/java/org/opensearch/gateway/MockGatewayMetaState.java @@ -48,6 +48,7 @@ import org.opensearch.gateway.remote.RemoteClusterStateService; import org.opensearch.plugins.MetadataUpgrader; import org.opensearch.repositories.RepositoriesService; +import org.opensearch.threadpool.TestThreadPool; import org.opensearch.threadpool.ThreadPool; import org.opensearch.transport.TransportService; @@ -121,7 +122,8 @@ public void start( ), settings, new ClusterSettings(settings, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS), - () -> 0L + () -> 0L, + new TestThreadPool(getClass().getName()) ); } else { return null;