From 9baf88dfaada5fafd2d68aa60d1c12a173136959 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Thu, 8 Sep 2016 10:56:54 -0400 Subject: [PATCH] Handle node validation exception when starting Node#start can now throw a checked NodeValidationException; this commit adapts x-plugins for this new API. Relates elastic/elasticsearch#3381 Original commit: elastic/x-pack-elasticsearch@660c5ab8c1bf93677c4835b8fbba40e1908b3814 --- .../transport/ServerTransportFilterIntegrationTests.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/elasticsearch/x-pack/security/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterIntegrationTests.java b/elasticsearch/x-pack/security/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterIntegrationTests.java index adb1fc7ee4b..393d08023c4 100644 --- a/elasticsearch/x-pack/security/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterIntegrationTests.java +++ b/elasticsearch/x-pack/security/src/test/java/org/elasticsearch/xpack/security/transport/ServerTransportFilterIntegrationTests.java @@ -14,6 +14,7 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.discovery.MasterNotDiscoveredException; import org.elasticsearch.node.MockNode; import org.elasticsearch.node.Node; +import org.elasticsearch.node.NodeValidationException; import org.elasticsearch.test.SecurityIntegTestCase; import org.elasticsearch.transport.Transport; import org.elasticsearch.xpack.XPackPlugin; @@ -78,7 +79,7 @@ public class ServerTransportFilterIntegrationTests extends SecurityIntegTestCase .build(); } - public void testThatConnectionToServerTypeConnectionWorks() throws IOException { + public void testThatConnectionToServerTypeConnectionWorks() throws IOException, NodeValidationException { Path home = createTempDir(); Path xpackConf = home.resolve("config").resolve(XPackPlugin.NAME); Files.createDirectories(xpackConf); @@ -109,7 +110,7 @@ public class ServerTransportFilterIntegrationTests extends SecurityIntegTestCase } } - public void testThatConnectionToClientTypeConnectionIsRejected() throws IOException { + public void testThatConnectionToClientTypeConnectionIsRejected() throws IOException, NodeValidationException { Path home = createTempDir(); Path xpackConf = home.resolve("config").resolve(XPackPlugin.NAME); Files.createDirectories(xpackConf);