|
|
@@ -25,6 +25,7 @@ import org.elasticsearch.test.ESIntegTestCase;
|
|
|
import org.elasticsearch.transport.MockTcpTransportPlugin;
|
|
|
import org.elasticsearch.transport.Netty4Plugin;
|
|
|
import org.elasticsearch.transport.nio.MockNioTransportPlugin;
|
|
|
+import org.elasticsearch.transport.nio.NioTransportPlugin;
|
|
|
import org.junit.BeforeClass;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
@@ -39,9 +40,9 @@ public abstract class HttpSmokeTestCase extends ESIntegTestCase {
|
|
|
@SuppressWarnings("unchecked")
|
|
|
@BeforeClass
|
|
|
public static void setUpTransport() {
|
|
|
- nodeTransportTypeKey = getTypeKey(randomFrom(getTestTransportPlugin(), Netty4Plugin.class));
|
|
|
- nodeHttpTypeKey = getTypeKey(Netty4Plugin.class);
|
|
|
- clientTypeKey = getTypeKey(randomFrom(getTestTransportPlugin(), Netty4Plugin.class));
|
|
|
+ nodeTransportTypeKey = getTypeKey(randomFrom(getTestTransportPlugin(), Netty4Plugin.class, NioTransportPlugin.class));
|
|
|
+ nodeHttpTypeKey = getHttpTypeKey(randomFrom(Netty4Plugin.class, NioTransportPlugin.class));
|
|
|
+ clientTypeKey = getTypeKey(randomFrom(getTestTransportPlugin(), Netty4Plugin.class, NioTransportPlugin.class));
|
|
|
}
|
|
|
|
|
|
private static String getTypeKey(Class<? extends Plugin> clazz) {
|
|
|
@@ -49,12 +50,23 @@ public abstract class HttpSmokeTestCase extends ESIntegTestCase {
|
|
|
return MockTcpTransportPlugin.MOCK_TCP_TRANSPORT_NAME;
|
|
|
} else if (clazz.equals(MockNioTransportPlugin.class)) {
|
|
|
return MockNioTransportPlugin.MOCK_NIO_TRANSPORT_NAME;
|
|
|
+ } else if (clazz.equals(NioTransportPlugin.class)) {
|
|
|
+ return NioTransportPlugin.NIO_TRANSPORT_NAME;
|
|
|
} else {
|
|
|
assert clazz.equals(Netty4Plugin.class);
|
|
|
return Netty4Plugin.NETTY_TRANSPORT_NAME;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private static String getHttpTypeKey(Class<? extends Plugin> clazz) {
|
|
|
+ if (clazz.equals(NioTransportPlugin.class)) {
|
|
|
+ return NioTransportPlugin.NIO_HTTP_TRANSPORT_NAME;
|
|
|
+ } else {
|
|
|
+ assert clazz.equals(Netty4Plugin.class);
|
|
|
+ return Netty4Plugin.NETTY_HTTP_TRANSPORT_NAME;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
protected boolean addMockHttpTransport() {
|
|
|
return false; // enable http
|
|
|
@@ -70,12 +82,12 @@ public abstract class HttpSmokeTestCase extends ESIntegTestCase {
|
|
|
|
|
|
@Override
|
|
|
protected Collection<Class<? extends Plugin>> nodePlugins() {
|
|
|
- return Arrays.asList(getTestTransportPlugin(), Netty4Plugin.class);
|
|
|
+ return Arrays.asList(getTestTransportPlugin(), Netty4Plugin.class, NioTransportPlugin.class);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
|
|
|
- return Arrays.asList(getTestTransportPlugin(), Netty4Plugin.class);
|
|
|
+ return Arrays.asList(getTestTransportPlugin(), Netty4Plugin.class, NioTransportPlugin.class);
|
|
|
}
|
|
|
|
|
|
@Override
|