|
@@ -20,6 +20,7 @@
|
|
|
package org.elasticsearch.transport.client;
|
|
|
|
|
|
import com.carrotsearch.randomizedtesting.RandomizedTest;
|
|
|
+import org.apache.lucene.util.Constants;
|
|
|
import org.elasticsearch.client.transport.TransportClient;
|
|
|
import org.elasticsearch.common.network.NetworkModule;
|
|
|
import org.elasticsearch.common.settings.Settings;
|
|
@@ -40,6 +41,8 @@ public class PreBuiltTransportClientTests extends RandomizedTest {
|
|
|
|
|
|
@Test
|
|
|
public void testPluginInstalled() {
|
|
|
+ // TODO: remove when Netty 4.1.5 is upgraded to Netty 4.1.6 including https://github.com/netty/netty/pull/5778
|
|
|
+ assumeFalse(Constants.JRE_IS_MINIMUM_JAVA9);
|
|
|
try (TransportClient client = new PreBuiltTransportClient(Settings.EMPTY)) {
|
|
|
Settings settings = client.settings();
|
|
|
assertEquals(Netty4Plugin.NETTY_TRANSPORT_NAME, NetworkModule.HTTP_DEFAULT_TYPE_SETTING.get(settings));
|
|
@@ -49,9 +52,7 @@ public class PreBuiltTransportClientTests extends RandomizedTest {
|
|
|
|
|
|
@Test
|
|
|
public void testInstallPluginTwice() {
|
|
|
-
|
|
|
- for (Class<? extends Plugin> plugin : Arrays.asList(ReindexPlugin.class, PercolatorPlugin.class,
|
|
|
- MustachePlugin.class)) {
|
|
|
+ for (Class<? extends Plugin> plugin : Arrays.asList(ReindexPlugin.class, PercolatorPlugin.class, MustachePlugin.class)) {
|
|
|
try {
|
|
|
new PreBuiltTransportClient(Settings.EMPTY, plugin);
|
|
|
fail("exception expected");
|