keycloak-aplcache

Details

diff --git a/testsuite/performance/db-failover/README.md b/testsuite/performance/db-failover/README.md
index c378484..215652f 100644
--- a/testsuite/performance/db-failover/README.md
+++ b/testsuite/performance/db-failover/README.md
@@ -25,7 +25,7 @@ This script will:
 
 Parameterized by environment variables:
 - `MARIADB_HA_MODE` See: [MariaDB HA parameters](https://mariadb.com/kb/en/library/failover-and-high-availability-with-mariadb-connector-j/#failover-high-availability-parameters)
-   Defaults to `replication`.
+   Defaults to `replication:`.
 - `MARIADB_OPTIONS` See: [MariaDB HA options](https://mariadb.com/kb/en/library/failover-and-high-availability-with-mariadb-connector-j/#failover-high-availability-options).
    Use format: `?option1=value1[&option2=value2]...`. Default is an empty string.
 - `START_KEYCLOAK` Default is `false`. Use `export START_KEYCLOAK=true` to enable.
diff --git a/testsuite/performance/docker-compose-db-failover.yml b/testsuite/performance/docker-compose-db-failover.yml
index e20369e..21f7392 100644
--- a/testsuite/performance/docker-compose-db-failover.yml
+++ b/testsuite/performance/docker-compose-db-failover.yml
@@ -76,7 +76,7 @@ services:
         networks:
             - keycloak
         environment:
-            MARIADB_HA_MODE: ${MARIADB_HA_MODE:-replication}
+            MARIADB_HA_MODE: ${MARIADB_HA_MODE:-replication:}
             MARIADB_HOSTS: ${MARIADB_HOSTS:-mariadb_1:3306,mariadb_2:3306}
             MARIADB_OPTIONS: ${MARIADB_OPTIONS}
             MARIADB_DATABASE: keycloak
diff --git a/testsuite/performance/infinispan/pom.xml b/testsuite/performance/infinispan/pom.xml
index 2bf412f..df03ede 100644
--- a/testsuite/performance/infinispan/pom.xml
+++ b/testsuite/performance/infinispan/pom.xml
@@ -52,33 +52,21 @@
         
         <plugins>
             <plugin>
-                <artifactId>maven-dependency-plugin</artifactId>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>unpack-infinispan-servers</id>
+                        <id>download-infinispan</id>
                         <phase>generate-resources</phase>
                         <goals>
-                            <goal>unpack</goal>
+                            <goal>run</goal>
                         </goals>
                         <configuration>
-                            <overWriteIfNewer>true</overWriteIfNewer>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>${infinispan.groupId}</groupId>
-                                    <artifactId>${infinispan.artifactId}</artifactId>
-                                    <version>${infinispan.version}</version>
-                                    <type>zip</type>
-                                    <outputDirectory>${project.build.directory}</outputDirectory>
-                                </artifactItem>
-                            </artifactItems>
+                            <target>
+                                <ant antfile="infinispan.xml" target="download-infinispan" />
+                            </target>
                         </configuration>
                     </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <executions>
                     <execution>
                         <id>configure-infinispan</id>
                         <phase>process-resources</phase>
@@ -87,7 +75,7 @@
                         </goals>
                         <configuration>
                             <target>
-                                <ant antfile="configure.xml" target="configure-infinispan" />
+                                <ant antfile="infinispan.xml" target="configure-infinispan" />
                             </target>
                         </configuration>
                     </execution>
@@ -100,7 +88,7 @@
                         <configuration>
                             <skip>${skip.add.management.user}</skip>
                             <target>
-                                <ant antfile="configure.xml" target="add-management-user" />
+                                <ant antfile="infinispan.xml" target="add-management-user" />
                             </target>
                         </configuration>
                     </execution>
@@ -113,7 +101,7 @@
                         <configuration>
                             <skip>${skip.docker.config}</skip>
                             <target>
-                                <ant antfile="configure.xml" target="prepare-docker-config" />
+                                <ant antfile="infinispan.xml" target="prepare-docker-config" />
                             </target>
                         </configuration>
                     </execution>
diff --git a/testsuite/performance/infinispan/src/main/scripts/jboss-cli/add-private-network-interface.cli b/testsuite/performance/infinispan/src/main/scripts/jboss-cli/add-private-network-interface.cli
index 3cab3eb..8b519b1 100644
--- a/testsuite/performance/infinispan/src/main/scripts/jboss-cli/add-private-network-interface.cli
+++ b/testsuite/performance/infinispan/src/main/scripts/jboss-cli/add-private-network-interface.cli
@@ -1,14 +1,13 @@
 embed-server --server-config=clustered.xml
 
-# ADD PRIVATE NETWORK INTERFATCE for cross-DC communication
+echo *** Adding private network interface for cross-DC communication
 
 /interface=private:add(inet-address=${jboss.bind.address.private:127.0.0.1})
 
 
-# ADD PRIVATE JGROUPS SOCKET BINDINGS
+echo *** Adding jgroups socket bindings for private network interface
 
 cd /socket-binding-group=standard-sockets
-
 ./socket-binding=jgroups-mping-private:add( interface=private, port=0, multicast-address="${jboss.private.multicast.address:234.99.54.14}", multicast-port="45700")
 ./socket-binding=jgroups-tcp-private:add(   interface=private, port=7600)
 ./socket-binding=jgroups-tcp-fd-private:add(interface=private, port=57600)
@@ -16,27 +15,19 @@ cd /socket-binding-group=standard-sockets
 ./socket-binding=jgroups-udp-fd-private:add(interface=private, port=54200)
 
 
-# ADD PRIVATE TCP STACK
-
-cd /subsystem=datagrid-jgroups
-
-./stack=tcp-private:add(transport={type=TCP, socket-binding=jgroups-tcp-private})
-cd stack=tcp-private
-
-:add-protocol(type=MPING, socket-binding=jgroups-mping-private)
-:add-protocol(type=MERGE3)
-:add-protocol(type=FD_SOCK, socket-binding=jgroups-tcp-fd-private)
-:add-protocol(type=FD_ALL)
-:add-protocol(type=VERIFY_SUSPECT)
-:add-protocol(type=pbcast.NAKACK2, properties={"use_mcast_xmit" => "false"})
-:add-protocol(type=UNICAST3)
-:add-protocol(type=pbcast.STABLE)
-:add-protocol(type=pbcast.GMS)
-:add-protocol(type=MFC)
-# ISPN 8
-:add-protocol(type=FRAG2)
-## ISPN 9
-#:add-protocol(type=FRAG3)
-cd ..
-
-
+echo *** Adding TCP protocol stack for private network interface
+
+/subsystem=datagrid-jgroups/stack=tcp-private:add(transport={type=TCP, socket-binding=jgroups-tcp-private}, protocols=[ \
+    {type=MPING, socket-binding=jgroups-mping-private}, \
+    {type=MERGE3}, \
+    {type=FD_SOCK, socket-binding=jgroups-tcp-fd-private}, \
+    {type=FD_ALL}, \
+    {type=VERIFY_SUSPECT}, \
+    {type=pbcast.NAKACK2, properties={"use_mcast_xmit" => "false"}}, \
+    {type=UNICAST3}, \
+    {type=pbcast.STABLE}, \
+    {type=pbcast.GMS}, \
+    {type=MFC_NB}, \
+    {type=FRAG3} \
+])
+# Note: for Infinispan 8.x change the above FRAG3 to FRAG2
diff --git a/testsuite/performance/keycloak/configure.xml b/testsuite/performance/keycloak/configure.xml
index 6bd3fc9..c726821 100644
--- a/testsuite/performance/keycloak/configure.xml
+++ b/testsuite/performance/keycloak/configure.xml
@@ -38,10 +38,6 @@
             <env key="JBOSS_HOME" value="${server.unpacked.home}"/>
         </exec>
         <exec executable="./${jboss.cli.script}" dir="${server.unpacked.home}/bin" failonerror="true">
-            <arg value="--file=modcluster-simple-load-provider.cli"/>
-            <env key="JBOSS_HOME" value="${server.unpacked.home}"/>
-        </exec>
-        <exec executable="./${jboss.cli.script}" dir="${server.unpacked.home}/bin" failonerror="true">
             <arg value="--file=io-worker-threads.cli"/>
             <env key="JBOSS_HOME" value="${server.unpacked.home}"/>
         </exec>
diff --git a/testsuite/performance/keycloak/pom.xml b/testsuite/performance/keycloak/pom.xml
index 86b2cd7..bec6e10 100644
--- a/testsuite/performance/keycloak/pom.xml
+++ b/testsuite/performance/keycloak/pom.xml
@@ -43,7 +43,7 @@
         
         <jdbc.driver.groupId>org.mariadb.jdbc</jdbc.driver.groupId>
         <jdbc.driver.artifactId>mariadb-java-client</jdbc.driver.artifactId>
-        <jdbc.driver.version>2.0.3</jdbc.driver.version>
+        <jdbc.driver.version>2.2.4</jdbc.driver.version>
         <jdbc.driver.module.path>org/mariadb/jdbc</jdbc.driver.module.path>
 
         <script.extension>sh</script.extension>
diff --git a/testsuite/performance/keycloak/src/main/resources/module.xml b/testsuite/performance/keycloak/src/main/resources/module.xml
index 3ba5359..54bec11 100644
--- a/testsuite/performance/keycloak/src/main/resources/module.xml
+++ b/testsuite/performance/keycloak/src/main/resources/module.xml
@@ -20,7 +20,7 @@
   ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
   ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
   -->
-<module xmlns="urn:jboss:module:1.0" name="@MODULE_NAME@">
+<module xmlns="urn:jboss:module:1.5" name="@MODULE_NAME@">
    <resources>
       <resource-root path="@RESOURCE_ROOT_PATH@"/>
    </resources>
diff --git a/testsuite/performance/keycloak/src/main/scripts/jboss-cli/add-remote-cache-stores.cli b/testsuite/performance/keycloak/src/main/scripts/jboss-cli/add-remote-cache-stores.cli
index e9f6174..b103426 100644
--- a/testsuite/performance/keycloak/src/main/scripts/jboss-cli/add-remote-cache-stores.cli
+++ b/testsuite/performance/keycloak/src/main/scripts/jboss-cli/add-remote-cache-stores.cli
@@ -7,14 +7,20 @@ cd /subsystem=infinispan/cache-container=keycloak
 
 :write-attribute(name=module, value=org.keycloak.keycloak-model-infinispan)
 
-./replicated-cache=work/store=remote:add(cache=work,                                    fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory})
+./replicated-cache=work/store=remote:add(cache=work,                                    fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, protocolVersion=${env.HOTROD_VERSION:2.8}})
+./distributed-cache=sessions/store=remote:add(cache=sessions,                           fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, protocolVersion=${env.HOTROD_VERSION:2.8}})
+./distributed-cache=offlineSessions/store=remote:add(cache=offlineSessions,             fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, protocolVersion=${env.HOTROD_VERSION:2.8}})
+./distributed-cache=clientSessions/store=remote:add(cache=clientSessions,               fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, protocolVersion=${env.HOTROD_VERSION:2.8}})
+./distributed-cache=offlineClientSessions/store=remote:add(cache=offlineClientSessions, fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, protocolVersion=${env.HOTROD_VERSION:2.8}})
+./distributed-cache=loginFailures/store=remote:add(cache=loginFailures,                 fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, protocolVersion=${env.HOTROD_VERSION:2.8}})
+./distributed-cache=actionTokens/store=remote:add(cache=actionTokens,                   fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory, protocolVersion=${env.HOTROD_VERSION:2.8}})
 
-./distributed-cache=sessions/store=remote:add(cache=sessions,                           fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory})
-./distributed-cache=offlineSessions/store=remote:add(cache=offlineSessions,             fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory})
-./distributed-cache=clientSessions/store=remote:add(cache=clientSessions,               fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory})
-./distributed-cache=offlineClientSessions/store=remote:add(cache=offlineClientSessions, fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory})
-./distributed-cache=loginFailures/store=remote:add(cache=loginFailures,                 fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory})
 
-./distributed-cache=actionTokens/store=remote:add(cache=actionTokens,                   fetch-state=false, passivation=false, preload=false, purge=false, remote-servers=["remote-cache"], shared=true, properties={rawValues=true, marshaller=org.keycloak.cluster.infinispan.KeycloakHotRodMarshallerFactory})
-./distributed-cache=actionTokens/memory-object:add(size=-1)
-./distributed-cache=actionTokens/expiration=EXPIRATION:add(max-idle=-1,interval=300000)
\ No newline at end of file
+./replicated-cache=work:write-attribute                     (name=statistics-enabled, value=${env.CACHE_STATISTICS:true})
+./distributed-cache=sessions:write-attribute                (name=statistics-enabled, value=${env.CACHE_STATISTICS:true})
+./distributed-cache=offlineSessions:write-attribute         (name=statistics-enabled, value=${env.CACHE_STATISTICS:true})
+./distributed-cache=clientSessions:write-attribute          (name=statistics-enabled, value=${env.CACHE_STATISTICS:true})
+./distributed-cache=offlineClientSessions:write-attribute   (name=statistics-enabled, value=${env.CACHE_STATISTICS:true})
+./distributed-cache=loginFailures:write-attribute           (name=statistics-enabled, value=${env.CACHE_STATISTICS:true})
+./distributed-cache=actionTokens:write-attribute            (name=statistics-enabled, value=${env.CACHE_STATISTICS:true})
+
diff --git a/testsuite/performance/keycloak/src/main/scripts/jboss-cli/set-keycloak-ds-batch.cli b/testsuite/performance/keycloak/src/main/scripts/jboss-cli/set-keycloak-ds-batch.cli
index 35df67e..396b586 100644
--- a/testsuite/performance/keycloak/src/main/scripts/jboss-cli/set-keycloak-ds-batch.cli
+++ b/testsuite/performance/keycloak/src/main/scripts/jboss-cli/set-keycloak-ds-batch.cli
@@ -1,8 +1,8 @@
-/subsystem=datasources/jdbc-driver=mariadb:add(driver-name=mariadb, driver-module-name=org.mariadb.jdbc, driver-xa-datasource-class-name=org.mariadb.jdbc.Driver)
+/subsystem=datasources/jdbc-driver=mariadb:add(driver-name=mariadb, driver-module-name=org.mariadb.jdbc, driver-xa-datasource-class-name=org.mariadb.jdbc.MySQLDataSource)
 
 cd /subsystem=datasources/data-source=KeycloakDS
 
-:write-attribute(name=connection-url, value=jdbc:mariadb:${env.MARIADB_HA_MODE:}://${env.MARIADB_HOSTS:mariadb:3306}/${env.MARIADB_DATABASE:keycloak}${env.MARIADB_OPTIONS:})
+:write-attribute(name=connection-url, value=jdbc:mariadb:${env.MARIADB_HA_MODE:}//${env.MARIADB_HOSTS:mariadb:3306}/${env.MARIADB_DATABASE:keycloak}${env.MARIADB_OPTIONS:})
 :write-attribute(name=driver-name, value=mariadb)
 :write-attribute(name=user-name, value=${env.MARIADB_USER:keycloak})
 :write-attribute(name=password, value=${env.MARIADB_PASSWORD:keycloak})
diff --git a/testsuite/performance/tests/src/main/docker-compose/crossdc/docker-compose-keycloak_dc1.yml b/testsuite/performance/tests/src/main/docker-compose/crossdc/docker-compose-keycloak_dc1.yml
index b197bb5..010e0d5 100644
--- a/testsuite/performance/tests/src/main/docker-compose/crossdc/docker-compose-keycloak_dc1.yml
+++ b/testsuite/performance/tests/src/main/docker-compose/crossdc/docker-compose-keycloak_dc1.yml
@@ -24,6 +24,8 @@
             KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD:-admin}
             INFINISPAN_HOST: infinispan_dc1
             SITE: dc1
+            HOTROD_VERSION: 2.8
+            CACHE_STATISTICS: "true"
             
             JAVA_OPTS: ${KEYCLOAK_JVM_MEMORY:--Xms64m -Xmx2g -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m} -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
             HTTP_MAX_CONNECTIONS: ${KEYCLOAK_HTTP_MAX_CONNECTIONS:-50000}
diff --git a/testsuite/performance/tests/src/main/docker-compose/crossdc/docker-compose-keycloak_dc2.yml b/testsuite/performance/tests/src/main/docker-compose/crossdc/docker-compose-keycloak_dc2.yml
index b8fadf2..a76e1c7 100644
--- a/testsuite/performance/tests/src/main/docker-compose/crossdc/docker-compose-keycloak_dc2.yml
+++ b/testsuite/performance/tests/src/main/docker-compose/crossdc/docker-compose-keycloak_dc2.yml
@@ -19,6 +19,8 @@
             MARIADB_PASSWORD: keycloak
             INFINISPAN_HOST: infinispan_dc2
             SITE: dc2
+            HOTROD_VERSION: 2.8
+            CACHE_STATISTICS: "true"
 
             JAVA_OPTS: ${KEYCLOAK_JVM_MEMORY:--Xms64m -Xmx2g -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m} -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
             HTTP_MAX_CONNECTIONS: ${KEYCLOAK_HTTP_MAX_CONNECTIONS:-50000}