Remove AUTO_SERVER H2 default JDBC property (#30560)

This avoids problems if the hostname can't be resolved by InetAddress.getLocalHost()

Closes #26042

Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
This commit is contained in:
Alexander Schwartz 2024-06-20 17:01:41 +02:00 committed by GitHub
parent 6d072448e9
commit 3b3ca601bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 6 deletions

View File

@ -533,7 +533,7 @@ jobs:
- name: Run cluster tests
run: |
./mvnw test ${{ env.SUREFIRE_RETRY }} -Pauth-server-cluster-quarkus -Dsession.cache.owners=2 -Dtest=**.cluster.** -pl testsuite/integration-arquillian/tests/base 2>&1 | misc/log/trimmer.sh
./mvnw test ${{ env.SUREFIRE_RETRY }} -Pauth-server-cluster-quarkus,db-postgres -Dsession.cache.owners=2 -Dtest=**.cluster.** -pl testsuite/integration-arquillian/tests/base 2>&1 | misc/log/trimmer.sh
- name: Upload JVM Heapdumps
if: always()

View File

@ -123,7 +123,7 @@ public final class Database {
if ("dev-file".equalsIgnoreCase(alias)) {
return addH2NonKeywords("jdbc:h2:file:${kc.home.dir:${kc.db-url-path:" + escapeReplacements(System.getProperty("user.home")) + "}}" + escapeReplacements(File.separator) + "${kc.data.dir:data}"
+ escapeReplacements(File.separator) + "h2" + escapeReplacements(File.separator)
+ "keycloakdb${kc.db-url-properties:;;AUTO_SERVER=TRUE}");
+ "keycloakdb${kc.db-url-properties:}");
}
return addH2NonKeywords("jdbc:h2:mem:keycloakdb${kc.db-url-properties:}");
}

View File

@ -292,7 +292,7 @@ public class ConfigurationTest {
.toString()
.replaceFirst(isWindows() ? "file:///" : "file://", "");
assertEquals("jdbc:h2:file:" + userHomeUri + "data/h2/keycloakdb;;AUTO_SERVER=TRUE;NON_KEYWORDS=VALUE", config.getConfigValue("quarkus.datasource.jdbc.url").getValue());
assertEquals("jdbc:h2:file:" + userHomeUri + "data/h2/keycloakdb;NON_KEYWORDS=VALUE", config.getConfigValue("quarkus.datasource.jdbc.url").getValue());
ConfigArgsConfigSource.setCliArgs("--db=dev-mem");
config = createConfig();

View File

@ -357,17 +357,17 @@ Make sure the `testsuite/integration-arquillian/servers/auth-server/quarkus` mod
mvn -f testsuite/integration-arquillian/servers/auth-server/quarkus/pom.xml clean install \
-Pauth-server-cluster-quarkus
Run tests using the `auth-server-cluster-quarkus` profile:
Run tests using the `auth-server-cluster-quarkus` profile and with a database which is not H2:
mvn -f testsuite/integration-arquillian/tests/base/pom.xml clean install \
-Pauth-server-cluster-quarkus \
-Pauth-server-cluster-quarkus,db-postgres \
-Dsession.cache.owners=2 \
-Dtest=AuthenticationSessionFailoverClusterTest
Alternatively, you can perform both steps using the following command:
mvn -f testsuite/integration-arquillian/pom.xml clean install \
-Pauth-server-cluster-quarkus \
-Pauth-server-cluster-quarkus,db-postgres \
-Dsession.cache.owners=2 \
-Dtest=AuthenticationSessionFailoverClusterTest