From 6110dcc7104a12d62c407c13a3f808fb70b6949d Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Fri, 1 Jul 2016 12:45:43 -0700 Subject: [PATCH] Fix unit tests for http server that no longer need node service --- .../org/elasticsearch/http/HttpServerTests.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/core/src/test/java/org/elasticsearch/http/HttpServerTests.java b/core/src/test/java/org/elasticsearch/http/HttpServerTests.java index 828336c1603..9ed680a6fbe 100644 --- a/core/src/test/java/org/elasticsearch/http/HttpServerTests.java +++ b/core/src/test/java/org/elasticsearch/http/HttpServerTests.java @@ -18,7 +18,8 @@ */ package org.elasticsearch.http; -import org.elasticsearch.cluster.service.ClusterService; +import java.util.Map; + import org.elasticsearch.common.breaker.CircuitBreaker; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.bytes.BytesReference; @@ -32,7 +33,6 @@ import org.elasticsearch.common.unit.ByteSizeValue; import org.elasticsearch.common.util.concurrent.ThreadContext; import org.elasticsearch.indices.breaker.CircuitBreakerService; import org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService; -import org.elasticsearch.node.service.NodeService; import org.elasticsearch.rest.AbstractRestChannel; import org.elasticsearch.rest.BytesRestResponse; import org.elasticsearch.rest.RestController; @@ -42,10 +42,6 @@ import org.elasticsearch.rest.RestStatus; import org.elasticsearch.test.ESTestCase; import org.junit.Before; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.util.Map; - public class HttpServerTests extends ESTestCase { private static final ByteSizeValue BREAKER_LIMIT = new ByteSizeValue(20); private HttpServer httpServer; @@ -71,11 +67,7 @@ public class HttpServerTests extends ESTestCase { throw new IllegalArgumentException("test error"); }); - ClusterService clusterService = new ClusterService(Settings.EMPTY, - new ClusterSettings(settings, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS), null); - NodeService nodeService = new NodeService(Settings.EMPTY, null, null, null, null, null, null, null, null, - clusterService, null); - httpServer = new HttpServer(settings, httpServerTransport, restController, nodeService, null, circuitBreakerService); + httpServer = new HttpServer(settings, httpServerTransport, restController, null, circuitBreakerService); httpServer.start(); }