diff --git a/testsuite/integration-arquillian/servers/auth-server/jboss/common/datasource.xsl b/testsuite/integration-arquillian/servers/auth-server/jboss/common/datasource.xsl
index 98a4c46..b3f4c89 100644
--- a/testsuite/integration-arquillian/servers/auth-server/jboss/common/datasource.xsl
+++ b/testsuite/integration-arquillian/servers/auth-server/jboss/common/datasource.xsl
@@ -25,6 +25,7 @@
<xsl:variable name="nsDS" select="'urn:jboss:domain:datasources:'"/>
+ <xsl:variable name="nsKS" select="'urn:jboss:domain:keycloak-server'"/>
<!-- Remove keycloak datasource definition. -->
<xsl:template match="//*[local-name()='subsystem' and starts-with(namespace-uri(), $nsDS)]
@@ -34,6 +35,7 @@
<xsl:param name="db.jdbc_url"/>
<xsl:param name="driver"/>
+ <xsl:param name="schema"/>
<xsl:param name="min.poolsize" select="'10'"/>
<xsl:param name="max.poolsize" select="'50'"/>
@@ -72,6 +74,12 @@
</datasource>
</xsl:variable>
+ <xsl:variable name="newSchemaDefinition">
+ <xsl:if test="$schema != 'DEFAULT'">
+ <property name="schema" value="{$schema}"/>
+ </xsl:if>
+ </xsl:variable>
+
<xsl:variable name="newDriverDefinition">
<xsl:if test="$driver != 'h2'">
<driver name="{$driver}" module="test.jdbc.{$driver}" />
@@ -96,6 +104,16 @@
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>
+
+ <xsl:template match="//*[local-name()='subsystem' and starts-with(namespace-uri(), $nsKS)]
+ /*[local-name()='spi' and starts-with(namespace-uri(), $nsKS) and @name='connectionsJpa']
+ /*[local-name()='provider' and starts-with(namespace-uri(), $nsKS)]
+ /*[local-name()='properties' and starts-with(namespace-uri(), $nsKS)]">
+ <xsl:copy>
+ <xsl:copy-of select="$newSchemaDefinition"/>
+ <xsl:apply-templates select="@* | node()" />
+ </xsl:copy>
+ </xsl:template>
<!-- Copy everything else. -->
<xsl:template match="@*|node()">
diff --git a/testsuite/integration-arquillian/servers/auth-server/jboss/pom.xml b/testsuite/integration-arquillian/servers/auth-server/jboss/pom.xml
index 8b2d789..713374f 100644
--- a/testsuite/integration-arquillian/servers/auth-server/jboss/pom.xml
+++ b/testsuite/integration-arquillian/servers/auth-server/jboss/pom.xml
@@ -361,6 +361,7 @@
<properties>
<jdbc.mvn.driver.deployment.dir>${auth.server.home}/modules/system/layers/base/test/jdbc/${jdbc.mvn.artifactId}/main</jdbc.mvn.driver.deployment.dir>
<skip.h2.tcp>true</skip.h2.tcp>
+ <keycloak.connectionsJpa.schema>DEFAULT</keycloak.connectionsJpa.schema>
</properties>
<build>
<pluginManagement>
@@ -479,6 +480,10 @@
<name>password</name>
<value>${keycloak.connectionsJpa.password}</value>
</parameter>
+ <parameter>
+ <name>schema</name>
+ <value>${keycloak.connectionsJpa.schema}</value>
+ </parameter>
</parameters>
</transformationSet>
<!-- add logger for org.hibernate.dialect.Dialect -->