Fix compile issues after removal of loadConfigSettings from transport
client Original commit: elastic/x-pack-elasticsearch@2efe4f2980
This commit is contained in:
parent
e7b338a077
commit
2ab0db4373
|
@ -30,7 +30,7 @@ public class MarvelLauncher {
|
|||
settings.put("cluster.name", MarvelLauncher.class.getSimpleName());
|
||||
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
final Node node = new MockNode(settings.build(), false, Version.CURRENT, Arrays.asList(MarvelPlugin.class, LicensePlugin.class));
|
||||
final Node node = new MockNode(settings.build(), Version.CURRENT, Arrays.asList(MarvelPlugin.class, LicensePlugin.class));
|
||||
Runtime.getRuntime().addShutdownHook(new Thread() {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -412,7 +412,7 @@ public class LdapUserSearchSessionFactoryTests extends LdapTestCase {
|
|||
}
|
||||
builder.put("path.home", createTempDir());
|
||||
|
||||
try (Node node = new MockNode(builder.build(), false, Version.CURRENT, Arrays.asList(ShieldPlugin.class, LicensePlugin.class))) {
|
||||
try (Node node = new MockNode(builder.build(), Version.CURRENT, Arrays.asList(ShieldPlugin.class, LicensePlugin.class))) {
|
||||
node.start();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ public class ServerTransportFilterIntegrationTests extends ShieldIntegTestCase {
|
|||
.put(InternalCryptoService.FILE_SETTING, systemKeyFile)
|
||||
.put("node.client", true)
|
||||
.build();
|
||||
try (Node node = new MockNode(nodeSettings, true, Version.CURRENT, Arrays.asList(ShieldPlugin.class, licensePluginClass()))) {
|
||||
try (Node node = new MockNode(nodeSettings, Version.CURRENT, Arrays.asList(ShieldPlugin.class, licensePluginClass()))) {
|
||||
node.start();
|
||||
assertGreenClusterState(node.client());
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ public class SslHostnameVerificationTests extends ShieldIntegTestCase {
|
|||
.put(ShieldNettyTransport.HOSTNAME_VERIFICATION_SETTING, true)
|
||||
.build();
|
||||
|
||||
try (TransportClient client = TransportClient.builder().settings(settings).loadConfigSettings(false).build()) {
|
||||
try (TransportClient client = TransportClient.builder().settings(settings).build()) {
|
||||
client.addTransportAddress(new InetSocketTransportAddress(inetSocketAddress.getAddress(), inetSocketAddress.getPort()));
|
||||
client.admin().cluster().prepareHealth().get();
|
||||
fail("Expected a NoNodeAvailableException due to hostname verification failures");
|
||||
|
|
|
@ -90,7 +90,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
|||
.put("path.home", createTempDir())
|
||||
.put(additionalSettings)
|
||||
.build();
|
||||
return TransportClient.builder().settings(settings).loadConfigSettings(false)
|
||||
return TransportClient.builder().settings(settings)
|
||||
.addPlugin(licensePluginClass())
|
||||
.addPlugin(ShieldPlugin.class)
|
||||
.build();
|
||||
|
@ -217,7 +217,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
|||
.put("cluster.name", internalCluster().getClusterName())
|
||||
.put("path.home", createTempDir())
|
||||
.build();
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).loadConfigSettings(false).addPlugin(ShieldPlugin.class).addPlugin(licensePluginClass()).build()) {
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).addPlugin(ShieldPlugin.class).addPlugin(licensePluginClass()).build()) {
|
||||
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("no_ssl")));
|
||||
assertGreenClusterState(transportClient);
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
|||
.put("cluster.name", internalCluster().getClusterName())
|
||||
.put("path.home", createTempDir())
|
||||
.build();
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).loadConfigSettings(false).build()) {
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) {
|
||||
transportClient.addTransportAddress(internalCluster().getInstance(Transport.class).boundAddress().boundAddress());
|
||||
assertGreenClusterState(transportClient);
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
|||
.put("cluster.name", internalCluster().getClusterName())
|
||||
.put("path.home", createTempDir())
|
||||
.build();
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).loadConfigSettings(false).build()) {
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) {
|
||||
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("client")));
|
||||
assertGreenClusterState(transportClient);
|
||||
}
|
||||
|
@ -268,7 +268,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
|||
.put("cluster.name", internalCluster().getClusterName())
|
||||
.put("path.home", createTempDir())
|
||||
.build();
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).loadConfigSettings(false).build()) {
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) {
|
||||
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("no_client_auth")));
|
||||
assertGreenClusterState(transportClient);
|
||||
}
|
||||
|
@ -289,7 +289,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
|||
.put("shield.ssl.truststore.password", "truststore-testnode-only")
|
||||
.put("path.home", createTempDir())
|
||||
.build();
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).loadConfigSettings(false).addPlugin(ShieldPlugin.class).addPlugin(licensePluginClass()).build()) {
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).addPlugin(ShieldPlugin.class).addPlugin(licensePluginClass()).build()) {
|
||||
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("no_client_auth")));
|
||||
assertGreenClusterState(transportClient);
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
|||
.put("shield.ssl.truststore.password", "truststore-testnode-only")
|
||||
.put("path.home", createTempDir())
|
||||
.build();
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).loadConfigSettings(false).build()) {
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) {
|
||||
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("client")));
|
||||
assertGreenClusterState(transportClient);
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
|||
.put("shield.ssl.truststore.password", "truststore-testnode-only")
|
||||
.put("path.home", createTempDir())
|
||||
.build();
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).loadConfigSettings(false).build()) {
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) {
|
||||
transportClient.addTransportAddress(internalCluster().getInstance(Transport.class).boundAddress().boundAddress());
|
||||
assertGreenClusterState(transportClient);
|
||||
}
|
||||
|
@ -354,7 +354,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
|||
.put("shield.ssl.truststore.password", "truststore-testnode-only")
|
||||
.put("path.home", createTempDir())
|
||||
.build();
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).loadConfigSettings(false).build()) {
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) {
|
||||
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("no_ssl")));
|
||||
assertGreenClusterState(transportClient);
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
|||
.put("shield.transport.ssl", true)
|
||||
.put("path.home", createTempDir())
|
||||
.build();
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).loadConfigSettings(false).build()) {
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) {
|
||||
transportClient.addTransportAddress(internalCluster().getInstance(Transport.class).boundAddress().boundAddress());
|
||||
assertGreenClusterState(transportClient);
|
||||
}
|
||||
|
@ -392,7 +392,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
|||
.put("shield.transport.ssl", true)
|
||||
.put("path.home", createTempDir())
|
||||
.build();
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).loadConfigSettings(false).build()) {
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) {
|
||||
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("client")));
|
||||
assertGreenClusterState(transportClient);
|
||||
}
|
||||
|
@ -411,7 +411,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
|||
.put("shield.transport.ssl", true)
|
||||
.put("path.home", createTempDir())
|
||||
.build();
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).loadConfigSettings(false).build()) {
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) {
|
||||
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("no_client_auth")));
|
||||
assertGreenClusterState(transportClient);
|
||||
}
|
||||
|
@ -430,7 +430,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
|||
.put("shield.transport.ssl", true)
|
||||
.put("path.home", createTempDir())
|
||||
.build();
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).loadConfigSettings(false).build()) {
|
||||
try (TransportClient transportClient = TransportClient.builder().settings(settings).build()) {
|
||||
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("no_ssl")));
|
||||
assertGreenClusterState(transportClient);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ public class WatcherF {
|
|||
System.setProperty("es.watcher.actions.slack.service.account.a1.url", "https://hooks.slack.com/services/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");
|
||||
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
final Node node = new MockNode(settings.build(), false, Version.CURRENT, Arrays.asList(WatcherPlugin.class, LicensePlugin.class));
|
||||
final Node node = new MockNode(settings.build(), Version.CURRENT, Arrays.asList(WatcherPlugin.class, LicensePlugin.class));
|
||||
Runtime.getRuntime().addShutdownHook(new Thread() {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -58,7 +58,7 @@ public class WatcherExecutorServiceBenchmark {
|
|||
private static ScheduleTriggerEngineMock scheduler;
|
||||
|
||||
protected static void start() throws Exception {
|
||||
Node node = new MockNode(Settings.builder().put(SETTINGS).put("node.data", false).build(), false, Version.CURRENT, Arrays.asList(WatcherBenchmarkPlugin.class, LicensePlugin.class));
|
||||
Node node = new MockNode(Settings.builder().put(SETTINGS).put("node.data", false).build(), Version.CURRENT, Arrays.asList(WatcherBenchmarkPlugin.class, LicensePlugin.class));
|
||||
client = node.client();
|
||||
client.admin().cluster().prepareHealth("*").setWaitForGreenStatus().get();
|
||||
Thread.sleep(5000);
|
||||
|
|
|
@ -135,7 +135,7 @@ public class WatcherScheduleEngineBenchmark {
|
|||
.put("watcher.trigger.schedule.engine", engine)
|
||||
.put("node.data", false)
|
||||
.build();
|
||||
try (Node node = new MockNode(settings, false, Version.CURRENT, Arrays.asList(WatcherPlugin.class, LicensePlugin.class))) {
|
||||
try (Node node = new MockNode(settings, Version.CURRENT, Arrays.asList(WatcherPlugin.class, LicensePlugin.class))) {
|
||||
try (final Client client = node.client()) {
|
||||
client.admin().cluster().prepareHealth().setWaitForNodes("2").get();
|
||||
client.admin().indices().prepareDelete(HistoryStore.INDEX_PREFIX + "*").get();
|
||||
|
|
Loading…
Reference in New Issue