Avoid building configuration all the time when running tests

Closes #9262
This commit is contained in:
Pedro Igor 2021-12-20 17:18:44 -03:00
parent db60f56fe8
commit 15d5a074b0

View file

@ -152,8 +152,6 @@ public class KeycloakQuarkusServerDeployableContainer implements DeployableConta
commands.add("./kc.sh");
commands.add("start");
commands.add("-Dquarkus.http.root-path=/auth");
commands.add("--auto-build");
commands.add("--http-enabled=true");
if (Boolean.parseBoolean(System.getProperty("auth.server.debug", "false"))) {
@ -172,6 +170,11 @@ public class KeycloakQuarkusServerDeployableContainer implements DeployableConta
commands.add("-Djboss.node.name=" + configuration.getRoute());
}
// only run auto-build during restarts or when running cluster tests
if (restart.get() || "ha".equals(System.getProperty("auth.server.quarkus.cluster.config"))) {
commands.add("--auto-build");
commands.add("--http-relative-path=/auth");
String cacheMode = System.getProperty("auth.server.quarkus.cluster.config", "local");
if ("local".equals(cacheMode)) {
@ -179,6 +182,8 @@ public class KeycloakQuarkusServerDeployableContainer implements DeployableConta
} else {
commands.add("--cache-config-file=cluster-" + cacheMode + ".xml");
}
}
commands.addAll(getAdditionalBuildArgs());
return commands.toArray(new String[0]);