diff --git a/core/src/test/java/org/apache/druid/java/util/http/client/JankyServersTest.java b/core/src/test/java/org/apache/druid/java/util/http/client/JankyServersTest.java index 3cc2d06018c..3d12cf7a1fc 100644 --- a/core/src/test/java/org/apache/druid/java/util/http/client/JankyServersTest.java +++ b/core/src/test/java/org/apache/druid/java/util/http/client/JankyServersTest.java @@ -41,6 +41,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.ServerSocket; import java.net.Socket; +import java.net.SocketException; import java.net.URL; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; @@ -298,6 +299,7 @@ public class JankyServersTest public boolean isChannelClosedException(Throwable e) { return e instanceof ChannelException || + (e instanceof SocketException && e.getMessage().contains("Connection reset")) || (e instanceof IOException && e.getMessage().contains("Connection reset by peer")); } diff --git a/indexing-service/src/test/java/org/apache/druid/indexing/overlord/setup/JavaScriptWorkerSelectStrategyTest.java b/indexing-service/src/test/java/org/apache/druid/indexing/overlord/setup/JavaScriptWorkerSelectStrategyTest.java index cac81d1438f..8717edca6bb 100644 --- a/indexing-service/src/test/java/org/apache/druid/indexing/overlord/setup/JavaScriptWorkerSelectStrategyTest.java +++ b/indexing-service/src/test/java/org/apache/druid/indexing/overlord/setup/JavaScriptWorkerSelectStrategyTest.java @@ -32,10 +32,14 @@ import org.easymock.EasyMock; import org.hamcrest.CoreMatchers; import org.joda.time.Period; import org.junit.Assert; +import org.junit.Assume; +import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import javax.script.ScriptEngineManager; + public class JavaScriptWorkerSelectStrategyTest { @Rule @@ -71,6 +75,13 @@ public class JavaScriptWorkerSelectStrategyTest JavaScriptConfig.getEnabledInstance() ); + @Before + public void checkJdkCompatibility() + { + // skip tests for newer JDKs without javascript support + Assume.assumeNotNull(new ScriptEngineManager().getEngineByName("javascript")); + } + @Test public void testSerde() throws Exception { diff --git a/integration-tests/docker/environment-configs/router-custom-check-tls b/integration-tests/docker/environment-configs/router-custom-check-tls index d506a80a4bf..0414b16b65c 100644 --- a/integration-tests/docker/environment-configs/router-custom-check-tls +++ b/integration-tests/docker/environment-configs/router-custom-check-tls @@ -21,7 +21,7 @@ DRUID_SERVICE=router DRUID_LOG_PATH=/shared/logs/router-custom-check-tls.log # JAVA OPTS -SERVICE_DRUID_JAVA_OPTS=-server -Xmx64m -Xms64m -XX:+UseConcMarkSweepGC -XX:+PrintGCDetails -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5003 +SERVICE_DRUID_JAVA_OPTS=-server -Xmx64m -Xms64m -XX:+UseG1GC -XX:+PrintGCDetails -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5003 # Druid configs druid_plaintextPort=8891 diff --git a/integration-tests/docker/environment-configs/router-no-client-auth-tls b/integration-tests/docker/environment-configs/router-no-client-auth-tls index 7d3cc8144ed..9396b3b1742 100644 --- a/integration-tests/docker/environment-configs/router-no-client-auth-tls +++ b/integration-tests/docker/environment-configs/router-no-client-auth-tls @@ -21,7 +21,7 @@ DRUID_SERVICE=router DRUID_LOG_PATH=/shared/logs/router-no-client-auth-tls.log # JAVA OPTS -SERVICE_DRUID_JAVA_OPTS=-server -Xmx64m -Xms64m -XX:+UseConcMarkSweepGC -XX:+PrintGCDetails -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5002 +SERVICE_DRUID_JAVA_OPTS=-server -Xmx64m -Xms64m -XX:+UseG1GC -XX:+PrintGCDetails -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5002 # Druid configs druid_plaintextPort=8890 diff --git a/integration-tests/docker/environment-configs/router-permissive-tls b/integration-tests/docker/environment-configs/router-permissive-tls index d4aae6aa3dd..d827dae555b 100644 --- a/integration-tests/docker/environment-configs/router-permissive-tls +++ b/integration-tests/docker/environment-configs/router-permissive-tls @@ -21,7 +21,7 @@ DRUID_SERVICE=router DRUID_LOG_PATH=/shared/logs/router-permissive-tls.log # JAVA OPTS -SERVICE_DRUID_JAVA_OPTS=-server -Xmx64m -Xms64m -XX:+UseConcMarkSweepGC -XX:+PrintGCDetails -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5001 +SERVICE_DRUID_JAVA_OPTS=-server -Xmx64m -Xms64m -XX:+UseG1GC -XX:+PrintGCDetails -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5001 # Druid configs druid_plaintextPort=8889 diff --git a/server/src/test/java/org/apache/druid/server/router/JavaScriptTieredBrokerSelectorStrategyTest.java b/server/src/test/java/org/apache/druid/server/router/JavaScriptTieredBrokerSelectorStrategyTest.java index ec1ddb9f66a..fa8e931f0cd 100644 --- a/server/src/test/java/org/apache/druid/server/router/JavaScriptTieredBrokerSelectorStrategyTest.java +++ b/server/src/test/java/org/apache/druid/server/router/JavaScriptTieredBrokerSelectorStrategyTest.java @@ -32,10 +32,13 @@ import org.apache.druid.query.aggregation.LongSumAggregatorFactory; import org.apache.druid.query.topn.TopNQueryBuilder; import org.hamcrest.CoreMatchers; import org.junit.Assert; +import org.junit.Assume; +import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import javax.script.ScriptEngineManager; import java.util.LinkedHashMap; public class JavaScriptTieredBrokerSelectorStrategyTest @@ -48,6 +51,13 @@ public class JavaScriptTieredBrokerSelectorStrategyTest JavaScriptConfig.getEnabledInstance() ); + @Before + public void checkJdkCompatibility() + { + // skip tests for newer JDKs without javascript support + Assume.assumeNotNull(new ScriptEngineManager().getEngineByName("javascript")); + } + @Test public void testSerde() throws Exception {