diff --git a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/EnvSinglenodeCompatibility.java b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/EnvSinglenodeCompatibility.java index 12ee4047f532..e8aa07208f5d 100644 --- a/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/EnvSinglenodeCompatibility.java +++ b/testing/trino-product-tests-launcher/src/main/java/io/trino/tests/product/launcher/env/environment/EnvSinglenodeCompatibility.java @@ -68,8 +68,8 @@ public void extendEnvironment(Environment.Builder builder, Map e private void configureCompatibilityTestContainer(Environment.Builder builder, Config config) { - boolean java22 = config.getCompatibilityTestVersion() >= 447; - String jvmConfig = "conf/trino/etc/" + (java22 ? "jvm.config" : "jvm-pre-jdk22.config"); + boolean initialJdk22 = config.getCompatibilityTestVersion() >= 447 && config.getCompatibilityTestVersion() <= 452; + String jvmConfig = initialJdk22 ? "conf/trino/etc/jvm.config-initial-jdk-22" : "conf/trino/etc/jvm.config"; String dockerImage = config.getCompatibilityTestDockerImage(); String containerConfigDir = getConfigurationDirectory(dockerImage); DockerContainer container = new DockerContainer(dockerImage, COMPATIBILTY_TEST_CONTAINER_NAME) diff --git a/testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/conf/trino/etc/jvm.config b/testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/conf/trino/etc/jvm.config index 5ae5193e9980..c09ebeb9ffaf 100644 --- a/testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/conf/trino/etc/jvm.config +++ b/testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/conf/trino/etc/jvm.config @@ -17,7 +17,3 @@ # Allow loading dynamic agent used by JOL -XX:+EnableDynamicAgentLoading -XX:+UnlockDiagnosticVMOptions -# https://bugs.openjdk.org/browse/JDK-8329528 --XX:G1NumCollectionsKeepPinned=10000000 -# https://bugs.openjdk.org/browse/JDK-8327134 --Djava.security.manager=allow diff --git a/testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/conf/trino/etc/jvm-pre-jdk22.config b/testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/conf/trino/etc/jvm.config-initial-jdk-22 similarity index 81% rename from testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/conf/trino/etc/jvm-pre-jdk22.config rename to testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/conf/trino/etc/jvm.config-initial-jdk-22 index c09ebeb9ffaf..5ae5193e9980 100644 --- a/testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/conf/trino/etc/jvm-pre-jdk22.config +++ b/testing/trino-product-tests-launcher/src/main/resources/docker/trino-product-tests/conf/trino/etc/jvm.config-initial-jdk-22 @@ -17,3 +17,7 @@ # Allow loading dynamic agent used by JOL -XX:+EnableDynamicAgentLoading -XX:+UnlockDiagnosticVMOptions +# https://bugs.openjdk.org/browse/JDK-8329528 +-XX:G1NumCollectionsKeepPinned=10000000 +# https://bugs.openjdk.org/browse/JDK-8327134 +-Djava.security.manager=allow