From 22c4fb9a325b95959cec3c4ea62d3ec9e64501a6 Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Fri, 6 May 2016 09:05:45 +0200 Subject: [PATCH] Make compilation pass. Note: tests are still failing. Original commit: elastic/x-pack-elasticsearch@827d129876b215d1998130f1bef6a147d6afe76e --- .../marvel/action/TransportMonitoringBulkActionTests.java | 2 +- .../shield/transport/ShieldClientTransportService.java | 6 ++++-- .../shield/transport/ShieldServerTransportService.java | 4 +++- .../shield/transport/TransportFilterTests.java | 7 ++++--- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/action/TransportMonitoringBulkActionTests.java b/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/action/TransportMonitoringBulkActionTests.java index 4dc0f3d7d11..f9876038b73 100644 --- a/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/action/TransportMonitoringBulkActionTests.java +++ b/elasticsearch/x-pack/marvel/src/test/java/org/elasticsearch/marvel/action/TransportMonitoringBulkActionTests.java @@ -105,7 +105,7 @@ public class TransportMonitoringBulkActionTests extends ESTestCase { clusterService.setClusterStatePublisher((event, ackListener) -> {}); clusterService.start(); - transportService = new TransportService(transport, threadPool); + transportService = new TransportService(Settings.EMPTY, transport, threadPool, clusterService.state().getClusterName()); transportService.start(); transportService.acceptIncomingRequests(); exportService = new CapturingExporters(); diff --git a/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/transport/ShieldClientTransportService.java b/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/transport/ShieldClientTransportService.java index efe014c74c8..c4320ab973e 100644 --- a/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/transport/ShieldClientTransportService.java +++ b/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/transport/ShieldClientTransportService.java @@ -5,6 +5,7 @@ */ package org.elasticsearch.shield.transport; +import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; @@ -22,8 +23,9 @@ public class ShieldClientTransportService extends TransportService { private final ClientTransportFilter clientFilter; @Inject - public ShieldClientTransportService(Settings settings, Transport transport, ThreadPool threadPool, ClientTransportFilter clientFilter) { - super(settings, transport, threadPool); + public ShieldClientTransportService(Settings settings, Transport transport, ThreadPool threadPool, + ClusterName clusterName, ClientTransportFilter clientFilter) { + super(settings, transport, threadPool, clusterName); this.clientFilter = clientFilter; } diff --git a/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/transport/ShieldServerTransportService.java b/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/transport/ShieldServerTransportService.java index 55aa96a4cf6..33a7ae27cb1 100644 --- a/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/transport/ShieldServerTransportService.java +++ b/elasticsearch/x-pack/shield/src/main/java/org/elasticsearch/shield/transport/ShieldServerTransportService.java @@ -5,6 +5,7 @@ */ package org.elasticsearch.shield.transport; +import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; @@ -55,12 +56,13 @@ public class ShieldServerTransportService extends TransportService { @Inject public ShieldServerTransportService(Settings settings, Transport transport, ThreadPool threadPool, + ClusterName clusterName, AuthenticationService authcService, AuthorizationService authzService, ShieldActionMapper actionMapper, ClientTransportFilter clientTransportFilter, SecurityLicenseState licenseState) { - super(settings, transport, threadPool); + super(settings, transport, threadPool, clusterName); this.authcService = authcService; this.authzService = authzService; this.actionMapper = actionMapper; diff --git a/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/transport/TransportFilterTests.java b/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/transport/TransportFilterTests.java index 4eca2456082..f46f7ab8c41 100644 --- a/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/transport/TransportFilterTests.java +++ b/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/transport/TransportFilterTests.java @@ -6,6 +6,7 @@ package org.elasticsearch.shield.transport; import org.elasticsearch.cluster.service.ClusterService; +import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.inject.AbstractModule; import org.elasticsearch.common.inject.Inject; @@ -307,9 +308,9 @@ public class TransportFilterTests extends ESIntegTestCase { @Inject public InternalPluginServerTransportService(Settings settings, Transport transport, ThreadPool threadPool, - AuthenticationService authcService, AuthorizationService authzService, ShieldActionMapper actionMapper, - ClientTransportFilter clientTransportFilter) { - super(settings, transport, threadPool, authcService, authzService, actionMapper, clientTransportFilter, + ClusterName clusterName, AuthenticationService authcService, AuthorizationService authzService, + ShieldActionMapper actionMapper, ClientTransportFilter clientTransportFilter) { + super(settings, transport, threadPool, clusterName, authcService, authzService, actionMapper, clientTransportFilter, mock(SecurityLicenseState.class)); when(licenseState.authenticationAndAuthorizationEnabled()).thenReturn(true); }