KEYCLOAK-9023 Add support for Java 11 to the testsuite

This commit is contained in:
vmuzikar 2018-12-06 08:25:01 +01:00 committed by Pavel Drozd
parent f52d7bef76
commit 3e48fa1dbc
5 changed files with 39 additions and 4 deletions

View file

@ -800,3 +800,7 @@ Then, before running the test, setup Keycloak Server distribution for the tests:
When running the test, add the following arguments to the command line:
-Pauth-server-wildfly -Pauth-server-enable-disable-feature -Dfeature.name=docker -Dfeature.value=enabled
## Java 11 support
Java 11 requires some arguments to be passed to JVM. Those can be activated using `-Pjava11-auth-server` and
`-Pjava11-app-server` profiles, respectively.

View file

@ -97,7 +97,8 @@ public class EAPAppServerProvider implements AppServerContainerProvider {
createChild("javaVmArguments",
System.getProperty("app.server.jboss.jvm.debug.args", "") + " " +
System.getProperty("app.server.memory.settings", "") + " " +
"-Djava.net.preferIPv4Stack=true"
"-Djava.net.preferIPv4Stack=true" + " " +
System.getProperty("app.server.jvm.args.extra")
);
createChild("managementProtocol", managementProtocol);
createChild("managementPort", managementPort);
@ -144,7 +145,8 @@ public class EAPAppServerProvider implements AppServerContainerProvider {
createChild("javaVmArguments",
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=790" + number + " " +
System.getProperty("app.server.memory.settings", "") + " " +
"-Djava.net.preferIPv4Stack=true"
"-Djava.net.preferIPv4Stack=true" + " " +
System.getProperty("app.server.jvm.args.extra")
);
createChild("managementProtocol", managementProtocol);
createChild("managementPort", managementPort);

View file

@ -95,7 +95,8 @@ public class WildflyAppServerProvider implements AppServerContainerProvider {
createChild("javaVmArguments",
System.getProperty("app.server.jboss.jvm.debug.args", "") + " " +
System.getProperty("app.server.memory.settings", "") + " " +
"-Djava.net.preferIPv4Stack=true"
"-Djava.net.preferIPv4Stack=true" + " " +
System.getProperty("app.server.jvm.args.extra")
);
createChild("managementProtocol", managementProtocol);
createChild("managementPort", managementPort);
@ -142,7 +143,8 @@ public class WildflyAppServerProvider implements AppServerContainerProvider {
createChild("javaVmArguments",
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=790" + number + " " +
System.getProperty("app.server.memory.settings", "") + " " +
"-Djava.net.preferIPv4Stack=true"
"-Djava.net.preferIPv4Stack=true" + " " +
System.getProperty("app.server.jvm.args.extra")
);
createChild("managementProtocol", managementProtocol);
createChild("managementPort", managementPort);

View file

@ -132,6 +132,7 @@
${auth.server.jboss.jvm.debug.args}
${auth.server.memory.settings}
-Djava.net.preferIPv4Stack=true
${auth.server.jvm.args.extra}
</property>
<property name="managementPort">${auth.server.management.port}</property>
<property name="startupTimeoutInSeconds">${auth.server.jboss.startup.timeout}</property>
@ -157,6 +158,7 @@
<property name="javaVmArguments">
${auth.server.memory.settings}
-Djava.net.preferIPv4Stack=true
${auth.server.jvm.args.extra}
</property>
<property name="outputToConsole">${backends.console.output}</property>
<property name="managementPort">${auth.server.backend1.management.port}</property>
@ -181,6 +183,7 @@
<property name="javaVmArguments">
${auth.server.memory.settings}
-Djava.net.preferIPv4Stack=true
${auth.server.jvm.args.extra}
</property>
<property name="outputToConsole">${backends.console.output}</property>
<property name="managementPort">${auth.server.backend2.management.port}</property>
@ -260,6 +263,7 @@
${auth.server.memory.settings}
-Djava.net.preferIPv4Stack=true
${cache.server.crossdc1.jvm.debug.args}
${auth.server.jvm.args.extra}
</property>
<property name="outputToConsole">${cache.server.console.output}</property>
<property name="managementPort">${cache.server.management.port}</property>
@ -288,6 +292,7 @@
${auth.server.memory.settings}
-Djava.net.preferIPv4Stack=true
${cache.server.crossdc2.jvm.debug.args}
${auth.server.jvm.args.extra}
</property>
<property name="outputToConsole">${cache.server.console.output}</property>
<property name="managementPort">${cache.server.2.management.port}</property>
@ -423,6 +428,7 @@
${auth.server.memory.settings}
-Djava.net.preferIPv4Stack=true
${auth.server.crossdc01.jvm.debug.args}
${auth.server.jvm.args.extra}
</property>
<property name="managementPort">${auth.server.crossdc01.management.port}</property>
<property name="bindHttpPortOffset">-79</property>
@ -451,6 +457,7 @@
${auth.server.memory.settings}
-Djava.net.preferIPv4Stack=true
${auth.server.crossdc02.jvm.debug.args}
${auth.server.jvm.args.extra}
</property>
<property name="managementPort">${auth.server.crossdc02.management.port}</property>
<property name="bindHttpPortOffset">-78</property>
@ -480,6 +487,7 @@
${auth.server.memory.settings}
-Djava.net.preferIPv4Stack=true
${auth.server.crossdc11.jvm.debug.args}
${auth.server.jvm.args.extra}
</property>
<property name="managementPort">${auth.server.crossdc11.management.port}</property>
<property name="bindHttpPortOffset">-69</property>
@ -508,6 +516,7 @@
${auth.server.memory.settings}
-Djava.net.preferIPv4Stack=true
${auth.server.crossdc12.jvm.debug.args}
${auth.server.jvm.args.extra}
</property>
<property name="managementPort">${auth.server.crossdc12.management.port}</property>
<property name="bindHttpPortOffset">-68</property>

View file

@ -69,6 +69,7 @@
<auth.server.adapter.impl.class>org.jboss.as.arquillian.container.managed.ManagedDeployableContainer</auth.server.adapter.impl.class>
<auth.server.truststore>&#36;{jboss.home.dir}/standalone/configuration/keycloak.truststore</auth.server.truststore>
<auth.server.truststore.password>secret</auth.server.truststore.password>
<auth.server.jvm.args.extra/>
<auth.server.jboss.artifactId>integration-arquillian-servers-auth-server-${auth.server}</auth.server.jboss.artifactId>
<auth.server.jboss.skip.unpack>${auth.server.undertow}</auth.server.jboss.skip.unpack>
@ -103,6 +104,7 @@
<!-- Cluster tests are failing with -Xmx512 for insufficient physical memory -->
<app.server.memory.settings>-Xms64m -Xmx384m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m</app.server.memory.settings>
<app.server.ssl.required>false</app.server.ssl.required>
<app.server.jvm.args.extra/>
<cache.server>undefined</cache.server>
<cache.server.container>cache-server-${cache.server}</cache.server.container>
@ -432,6 +434,7 @@
<auth.server.jboss.jvm.debug.args>${auth.server.jboss.jvm.debug.args}</auth.server.jboss.jvm.debug.args>
<auth.server.truststore>${auth.server.truststore}</auth.server.truststore>
<auth.server.truststore.password>${auth.server.truststore.password}</auth.server.truststore.password>
<auth.server.jvm.args.extra>${auth.server.jvm.args.extra}</auth.server.jvm.args.extra>
<auth.server.profile>${auth.server.profile}</auth.server.profile>
<auth.server.feature>${auth.server.feature}</auth.server.feature>
@ -452,6 +455,7 @@
<app.server.2.port.offset>${app.server.2.port.offset}</app.server.2.port.offset>
<app.server.2.management.port>${app.server.2.management.port}</app.server.2.management.port>
<app.server.jboss.jvm.debug.args>${app.server.jboss.jvm.debug.args}</app.server.jboss.jvm.debug.args>
<app.server.jvm.args.extra>${app.server.jvm.args.extra}</app.server.jvm.args.extra>
<frontend.console.output>${frontend.console.output}</frontend.console.output>
<backends.console.output>${backend.console.output}</backends.console.output>
@ -1693,6 +1697,20 @@
</properties>
</profile>
<profile>
<id>java11-auth-server</id> <!-- a temporary workaround; TODO remove this once Java 11 is officially supported by Arquillian -->
<properties>
<auth.server.jvm.args.extra>--add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED --add-modules=java.se</auth.server.jvm.args.extra>
</properties>
</profile>
<profile>
<id>java11-app-server</id> <!-- a temporary workaround; TODO remove this once Java 11 is officially supported by Arquillian -->
<properties>
<app.server.jvm.args.extra>--add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED --add-modules=java.se</app.server.jvm.args.extra>
</properties>
</profile>
</profiles>
</project>