Skip to content

Commit

Permalink
Update deprecated ClusterService constructor. (#576)
Browse files Browse the repository at this point in the history
Signed-off-by: Finn Carroll <carrofin@amazon.com>
  • Loading branch information
finnegancarroll authored May 21, 2024
1 parent f0fea73 commit f7a40bb
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.opensearch.common.settings.ClusterSettings;
import org.opensearch.common.settings.Settings;
import org.opensearch.threadpool.ThreadPool;
import org.opensearch.test.ClusterServiceUtils;

import java.io.IOException;
import java.util.Map;
Expand All @@ -30,7 +31,7 @@ public class TestUtils {

public static ClusterService createClusterService(Settings settings, ThreadPool threadPool, DiscoveryNode localNode,
ClusterSettings clusterSettings) {
ClusterService clusterService = new ClusterService(settings, clusterSettings, threadPool);
ClusterService clusterService = ClusterServiceUtils.createClusterService(settings, clusterSettings, threadPool);
clusterService.setNodeConnectionsService(createNoOpNodeConnectionsService());
ClusterState initialClusterState = ClusterState.builder(new ClusterName(TestUtils.class.getSimpleName()))
.nodes(DiscoveryNodes.builder()
Expand Down

0 comments on commit f7a40bb

Please sign in to comment.