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());
|
settings.put("cluster.name", MarvelLauncher.class.getSimpleName());
|
||||||
|
|
||||||
final CountDownLatch latch = new CountDownLatch(1);
|
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() {
|
Runtime.getRuntime().addShutdownHook(new Thread() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -412,7 +412,7 @@ public class LdapUserSearchSessionFactoryTests extends LdapTestCase {
|
||||||
}
|
}
|
||||||
builder.put("path.home", createTempDir());
|
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();
|
node.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ public class ServerTransportFilterIntegrationTests extends ShieldIntegTestCase {
|
||||||
.put(InternalCryptoService.FILE_SETTING, systemKeyFile)
|
.put(InternalCryptoService.FILE_SETTING, systemKeyFile)
|
||||||
.put("node.client", true)
|
.put("node.client", true)
|
||||||
.build();
|
.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();
|
node.start();
|
||||||
assertGreenClusterState(node.client());
|
assertGreenClusterState(node.client());
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,7 +77,7 @@ public class SslHostnameVerificationTests extends ShieldIntegTestCase {
|
||||||
.put(ShieldNettyTransport.HOSTNAME_VERIFICATION_SETTING, true)
|
.put(ShieldNettyTransport.HOSTNAME_VERIFICATION_SETTING, true)
|
||||||
.build();
|
.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.addTransportAddress(new InetSocketTransportAddress(inetSocketAddress.getAddress(), inetSocketAddress.getPort()));
|
||||||
client.admin().cluster().prepareHealth().get();
|
client.admin().cluster().prepareHealth().get();
|
||||||
fail("Expected a NoNodeAvailableException due to hostname verification failures");
|
fail("Expected a NoNodeAvailableException due to hostname verification failures");
|
||||||
|
|
|
@ -90,7 +90,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
||||||
.put("path.home", createTempDir())
|
.put("path.home", createTempDir())
|
||||||
.put(additionalSettings)
|
.put(additionalSettings)
|
||||||
.build();
|
.build();
|
||||||
return TransportClient.builder().settings(settings).loadConfigSettings(false)
|
return TransportClient.builder().settings(settings)
|
||||||
.addPlugin(licensePluginClass())
|
.addPlugin(licensePluginClass())
|
||||||
.addPlugin(ShieldPlugin.class)
|
.addPlugin(ShieldPlugin.class)
|
||||||
.build();
|
.build();
|
||||||
|
@ -217,7 +217,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
||||||
.put("cluster.name", internalCluster().getClusterName())
|
.put("cluster.name", internalCluster().getClusterName())
|
||||||
.put("path.home", createTempDir())
|
.put("path.home", createTempDir())
|
||||||
.build();
|
.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")));
|
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("no_ssl")));
|
||||||
assertGreenClusterState(transportClient);
|
assertGreenClusterState(transportClient);
|
||||||
}
|
}
|
||||||
|
@ -234,7 +234,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
||||||
.put("cluster.name", internalCluster().getClusterName())
|
.put("cluster.name", internalCluster().getClusterName())
|
||||||
.put("path.home", createTempDir())
|
.put("path.home", createTempDir())
|
||||||
.build();
|
.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());
|
transportClient.addTransportAddress(internalCluster().getInstance(Transport.class).boundAddress().boundAddress());
|
||||||
assertGreenClusterState(transportClient);
|
assertGreenClusterState(transportClient);
|
||||||
}
|
}
|
||||||
|
@ -251,7 +251,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
||||||
.put("cluster.name", internalCluster().getClusterName())
|
.put("cluster.name", internalCluster().getClusterName())
|
||||||
.put("path.home", createTempDir())
|
.put("path.home", createTempDir())
|
||||||
.build();
|
.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")));
|
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("client")));
|
||||||
assertGreenClusterState(transportClient);
|
assertGreenClusterState(transportClient);
|
||||||
}
|
}
|
||||||
|
@ -268,7 +268,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
||||||
.put("cluster.name", internalCluster().getClusterName())
|
.put("cluster.name", internalCluster().getClusterName())
|
||||||
.put("path.home", createTempDir())
|
.put("path.home", createTempDir())
|
||||||
.build();
|
.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")));
|
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("no_client_auth")));
|
||||||
assertGreenClusterState(transportClient);
|
assertGreenClusterState(transportClient);
|
||||||
}
|
}
|
||||||
|
@ -289,7 +289,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
||||||
.put("shield.ssl.truststore.password", "truststore-testnode-only")
|
.put("shield.ssl.truststore.password", "truststore-testnode-only")
|
||||||
.put("path.home", createTempDir())
|
.put("path.home", createTempDir())
|
||||||
.build();
|
.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")));
|
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("no_client_auth")));
|
||||||
assertGreenClusterState(transportClient);
|
assertGreenClusterState(transportClient);
|
||||||
}
|
}
|
||||||
|
@ -311,7 +311,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
||||||
.put("shield.ssl.truststore.password", "truststore-testnode-only")
|
.put("shield.ssl.truststore.password", "truststore-testnode-only")
|
||||||
.put("path.home", createTempDir())
|
.put("path.home", createTempDir())
|
||||||
.build();
|
.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")));
|
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("client")));
|
||||||
assertGreenClusterState(transportClient);
|
assertGreenClusterState(transportClient);
|
||||||
}
|
}
|
||||||
|
@ -333,7 +333,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
||||||
.put("shield.ssl.truststore.password", "truststore-testnode-only")
|
.put("shield.ssl.truststore.password", "truststore-testnode-only")
|
||||||
.put("path.home", createTempDir())
|
.put("path.home", createTempDir())
|
||||||
.build();
|
.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());
|
transportClient.addTransportAddress(internalCluster().getInstance(Transport.class).boundAddress().boundAddress());
|
||||||
assertGreenClusterState(transportClient);
|
assertGreenClusterState(transportClient);
|
||||||
}
|
}
|
||||||
|
@ -354,7 +354,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
||||||
.put("shield.ssl.truststore.password", "truststore-testnode-only")
|
.put("shield.ssl.truststore.password", "truststore-testnode-only")
|
||||||
.put("path.home", createTempDir())
|
.put("path.home", createTempDir())
|
||||||
.build();
|
.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")));
|
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("no_ssl")));
|
||||||
assertGreenClusterState(transportClient);
|
assertGreenClusterState(transportClient);
|
||||||
}
|
}
|
||||||
|
@ -373,7 +373,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
||||||
.put("shield.transport.ssl", true)
|
.put("shield.transport.ssl", true)
|
||||||
.put("path.home", createTempDir())
|
.put("path.home", createTempDir())
|
||||||
.build();
|
.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());
|
transportClient.addTransportAddress(internalCluster().getInstance(Transport.class).boundAddress().boundAddress());
|
||||||
assertGreenClusterState(transportClient);
|
assertGreenClusterState(transportClient);
|
||||||
}
|
}
|
||||||
|
@ -392,7 +392,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
||||||
.put("shield.transport.ssl", true)
|
.put("shield.transport.ssl", true)
|
||||||
.put("path.home", createTempDir())
|
.put("path.home", createTempDir())
|
||||||
.build();
|
.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")));
|
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("client")));
|
||||||
assertGreenClusterState(transportClient);
|
assertGreenClusterState(transportClient);
|
||||||
}
|
}
|
||||||
|
@ -411,7 +411,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
||||||
.put("shield.transport.ssl", true)
|
.put("shield.transport.ssl", true)
|
||||||
.put("path.home", createTempDir())
|
.put("path.home", createTempDir())
|
||||||
.build();
|
.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")));
|
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("no_client_auth")));
|
||||||
assertGreenClusterState(transportClient);
|
assertGreenClusterState(transportClient);
|
||||||
}
|
}
|
||||||
|
@ -430,7 +430,7 @@ public class SslMultiPortTests extends ShieldIntegTestCase {
|
||||||
.put("shield.transport.ssl", true)
|
.put("shield.transport.ssl", true)
|
||||||
.put("path.home", createTempDir())
|
.put("path.home", createTempDir())
|
||||||
.build();
|
.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")));
|
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getLoopbackAddress(), getProfilePort("no_ssl")));
|
||||||
assertGreenClusterState(transportClient);
|
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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");
|
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 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() {
|
Runtime.getRuntime().addShutdownHook(new Thread() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class WatcherExecutorServiceBenchmark {
|
||||||
private static ScheduleTriggerEngineMock scheduler;
|
private static ScheduleTriggerEngineMock scheduler;
|
||||||
|
|
||||||
protected static void start() throws Exception {
|
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 = node.client();
|
||||||
client.admin().cluster().prepareHealth("*").setWaitForGreenStatus().get();
|
client.admin().cluster().prepareHealth("*").setWaitForGreenStatus().get();
|
||||||
Thread.sleep(5000);
|
Thread.sleep(5000);
|
||||||
|
|
|
@ -135,7 +135,7 @@ public class WatcherScheduleEngineBenchmark {
|
||||||
.put("watcher.trigger.schedule.engine", engine)
|
.put("watcher.trigger.schedule.engine", engine)
|
||||||
.put("node.data", false)
|
.put("node.data", false)
|
||||||
.build();
|
.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()) {
|
try (final Client client = node.client()) {
|
||||||
client.admin().cluster().prepareHealth().setWaitForNodes("2").get();
|
client.admin().cluster().prepareHealth().setWaitForNodes("2").get();
|
||||||
client.admin().indices().prepareDelete(HistoryStore.INDEX_PREFIX + "*").get();
|
client.admin().indices().prepareDelete(HistoryStore.INDEX_PREFIX + "*").get();
|
||||||
|
|
Loading…
Reference in New Issue