Make compilation pass.

Note: tests are still failing.

Original commit: elastic/x-pack-elasticsearch@827d129876
This commit is contained in:
Adrien Grand 2016-05-06 09:05:45 +02:00
parent bd04cc9d1f
commit 22c4fb9a32
4 changed files with 12 additions and 7 deletions

View File

@ -105,7 +105,7 @@ public class TransportMonitoringBulkActionTests extends ESTestCase {
clusterService.setClusterStatePublisher((event, ackListener) -> {}); clusterService.setClusterStatePublisher((event, ackListener) -> {});
clusterService.start(); clusterService.start();
transportService = new TransportService(transport, threadPool); transportService = new TransportService(Settings.EMPTY, transport, threadPool, clusterService.state().getClusterName());
transportService.start(); transportService.start();
transportService.acceptIncomingRequests(); transportService.acceptIncomingRequests();
exportService = new CapturingExporters(); exportService = new CapturingExporters();

View File

@ -5,6 +5,7 @@
*/ */
package org.elasticsearch.shield.transport; package org.elasticsearch.shield.transport;
import org.elasticsearch.cluster.ClusterName;
import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;
@ -22,8 +23,9 @@ public class ShieldClientTransportService extends TransportService {
private final ClientTransportFilter clientFilter; private final ClientTransportFilter clientFilter;
@Inject @Inject
public ShieldClientTransportService(Settings settings, Transport transport, ThreadPool threadPool, ClientTransportFilter clientFilter) { public ShieldClientTransportService(Settings settings, Transport transport, ThreadPool threadPool,
super(settings, transport, threadPool); ClusterName clusterName, ClientTransportFilter clientFilter) {
super(settings, transport, threadPool, clusterName);
this.clientFilter = clientFilter; this.clientFilter = clientFilter;
} }

View File

@ -5,6 +5,7 @@
*/ */
package org.elasticsearch.shield.transport; package org.elasticsearch.shield.transport;
import org.elasticsearch.cluster.ClusterName;
import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;
@ -55,12 +56,13 @@ public class ShieldServerTransportService extends TransportService {
@Inject @Inject
public ShieldServerTransportService(Settings settings, Transport transport, ThreadPool threadPool, public ShieldServerTransportService(Settings settings, Transport transport, ThreadPool threadPool,
ClusterName clusterName,
AuthenticationService authcService, AuthenticationService authcService,
AuthorizationService authzService, AuthorizationService authzService,
ShieldActionMapper actionMapper, ShieldActionMapper actionMapper,
ClientTransportFilter clientTransportFilter, ClientTransportFilter clientTransportFilter,
SecurityLicenseState licenseState) { SecurityLicenseState licenseState) {
super(settings, transport, threadPool); super(settings, transport, threadPool, clusterName);
this.authcService = authcService; this.authcService = authcService;
this.authzService = authzService; this.authzService = authzService;
this.actionMapper = actionMapper; this.actionMapper = actionMapper;

View File

@ -6,6 +6,7 @@
package org.elasticsearch.shield.transport; package org.elasticsearch.shield.transport;
import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.cluster.ClusterName;
import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.inject.AbstractModule; import org.elasticsearch.common.inject.AbstractModule;
import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.inject.Inject;
@ -307,9 +308,9 @@ public class TransportFilterTests extends ESIntegTestCase {
@Inject @Inject
public InternalPluginServerTransportService(Settings settings, Transport transport, ThreadPool threadPool, public InternalPluginServerTransportService(Settings settings, Transport transport, ThreadPool threadPool,
AuthenticationService authcService, AuthorizationService authzService, ShieldActionMapper actionMapper, ClusterName clusterName, AuthenticationService authcService, AuthorizationService authzService,
ClientTransportFilter clientTransportFilter) { ShieldActionMapper actionMapper, ClientTransportFilter clientTransportFilter) {
super(settings, transport, threadPool, authcService, authzService, actionMapper, clientTransportFilter, super(settings, transport, threadPool, clusterName, authcService, authzService, actionMapper, clientTransportFilter,
mock(SecurityLicenseState.class)); mock(SecurityLicenseState.class));
when(licenseState.authenticationAndAuthorizationEnabled()).thenReturn(true); when(licenseState.authenticationAndAuthorizationEnabled()).thenReturn(true);
} }