This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/syncope.git

commit 69355c46d3564070be6ad453ab588074cbe8aba4
Author: Francesco Chicchiriccò <[email protected]>
AuthorDate: Fri Nov 14 09:58:38 2025 +0100

    Upgrading TestContainers
---
 core/persistence-jpa/pom.xml                       |  6 +--
 .../syncope/core/persistence/jpa/AbstractTest.java | 12 +++---
 ext/openfga/client-openfga/pom.xml                 |  2 +-
 pom.xml                                            | 45 ++++++++++++++++++++++
 4 files changed, 55 insertions(+), 10 deletions(-)

diff --git a/core/persistence-jpa/pom.xml b/core/persistence-jpa/pom.xml
index cc70f2eb0b..ec102968bf 100644
--- a/core/persistence-jpa/pom.xml
+++ b/core/persistence-jpa/pom.xml
@@ -107,17 +107,17 @@ under the License.
     </dependency>
     <dependency>
       <groupId>org.testcontainers</groupId>
-      <artifactId>mysql</artifactId>
+      <artifactId>testcontainers-mysql</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.testcontainers</groupId>
-      <artifactId>mariadb</artifactId>
+      <artifactId>testcontainers-mariadb</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.testcontainers</groupId>
-      <artifactId>oracle-free</artifactId>
+      <artifactId>testcontainers-oracle-free</artifactId>
       <scope>test</scope>
     </dependency>
   </dependencies>
diff --git 
a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/AbstractTest.java
 
b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/AbstractTest.java
index 73428bb16d..5f26de86bc 100644
--- 
a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/AbstractTest.java
+++ 
b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/AbstractTest.java
@@ -36,8 +36,8 @@ import 
org.springframework.test.context.DynamicPropertyRegistry;
 import org.springframework.test.context.DynamicPropertySource;
 import org.springframework.test.context.TestPropertySource;
 import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
-import org.testcontainers.containers.MariaDBContainer;
-import org.testcontainers.containers.MySQLContainer;
+import org.testcontainers.mariadb.MariaDBContainer;
+import org.testcontainers.mysql.MySQLContainer;
 import org.testcontainers.oracle.OracleContainer;
 
 @SpringJUnitConfig(classes = { MasterDomain.class, 
PersistenceTestContext.class })
@@ -126,7 +126,7 @@ public abstract class AbstractTest {
             INDEXES = "classpath:META-INF/mysql/indexes.xml";
             VIEWS = "classpath:META-INF/mysql/views.xml";
 
-            MySQLContainer<?> masterDomain = new MySQLContainer<>("mysql:" + 
dockerMySQLVersion).
+            MySQLContainer masterDomain = new MySQLContainer("mysql:" + 
dockerMySQLVersion).
                     withTmpFs(Map.of("/var/lib/mysql", "rw")).
                     
withDatabaseName("syncope").withPassword("syncope").withUsername("syncope").
                     withUrlParam("characterEncoding", "UTF-8").
@@ -134,7 +134,7 @@ public abstract class AbstractTest {
             masterDomain.start();
             JDBC_URL_SUPPLIER = masterDomain::getJdbcUrl;
 
-            MySQLContainer<?> twoDomain = new MySQLContainer<>("mysql:" + 
dockerMySQLVersion).
+            MySQLContainer twoDomain = new MySQLContainer("mysql:" + 
dockerMySQLVersion).
                     withTmpFs(Map.of("/var/lib/mysql", "rw")).
                     
withDatabaseName("syncope").withPassword("syncope").withUsername("syncope").
                     withUrlParam("characterEncoding", "UTF-8").
@@ -149,7 +149,7 @@ public abstract class AbstractTest {
             INDEXES = "classpath:META-INF/mariadb/indexes.xml";
             VIEWS = "classpath:META-INF/mariadb/views.xml";
 
-            MariaDBContainer<?> masterDomain = new 
MariaDBContainer<>("mariadb:" + dockerMariaDBVersion).
+            MariaDBContainer masterDomain = new MariaDBContainer("mariadb:" + 
dockerMariaDBVersion).
                     withTmpFs(Map.of("/var/lib/mysql", "rw")).
                     
withDatabaseName("syncope").withPassword("syncope").withUsername("syncope").
                     withUrlParam("characterEncoding", "UTF-8").
@@ -157,7 +157,7 @@ public abstract class AbstractTest {
             masterDomain.start();
             JDBC_URL_SUPPLIER = masterDomain::getJdbcUrl;
 
-            MariaDBContainer<?> twoDomain = new MariaDBContainer<>("mariadb:" 
+ dockerMariaDBVersion).
+            MariaDBContainer twoDomain = new MariaDBContainer("mariadb:" + 
dockerMariaDBVersion).
                     withTmpFs(Map.of("/var/lib/mysql", "rw")).
                     
withDatabaseName("syncope").withPassword("syncope").withUsername("syncope").
                     withUrlParam("characterEncoding", "UTF-8").
diff --git a/ext/openfga/client-openfga/pom.xml 
b/ext/openfga/client-openfga/pom.xml
index 153c5adccb..b0488d1c41 100644
--- a/ext/openfga/client-openfga/pom.xml
+++ b/ext/openfga/client-openfga/pom.xml
@@ -62,7 +62,7 @@ under the License.
     </dependency>
     <dependency>
       <groupId>org.testcontainers</groupId>
-      <artifactId>openfga</artifactId>
+      <artifactId>testcontainers-openfga</artifactId>
       <scope>test</scope>
     </dependency>
   </dependencies>
diff --git a/pom.xml b/pom.xml
index 5a63c5a9e9..620281052e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -491,6 +491,8 @@ under the License.
     <curator.version>5.9.0</curator.version>
     <zookeeper.version>3.9.4</zookeeper.version>
 
+    <testcontainers.version>2.0.2</testcontainers.version>
+
     <zonky.embedded-postgres.version>2.1.1</zonky.embedded-postgres.version>
     
<zonky.embedded-postgres-binaries.version>18.0.0</zonky.embedded-postgres-binaries.version>
 
@@ -1365,6 +1367,49 @@ under the License.
         <version>1.21.2</version>
       </dependency>
 
+      <dependency>
+        <groupId>org.testcontainers</groupId>
+        <artifactId>testcontainers</artifactId>
+        <version>${testcontainers.version}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.testcontainers</groupId>
+        <artifactId>testcontainers-jdbc</artifactId>
+        <version>${testcontainers.version}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.testcontainers</groupId>
+        <artifactId>testcontainers-database-commons</artifactId>
+        <version>${testcontainers.version}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.testcontainers</groupId>
+        <artifactId>testcontainers-mysql</artifactId>
+        <version>${testcontainers.version}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.testcontainers</groupId>
+        <artifactId>testcontainers-mariadb</artifactId>
+        <version>${testcontainers.version}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.testcontainers</groupId>
+        <artifactId>testcontainers-oracle-free</artifactId>
+        <version>${testcontainers.version}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.testcontainers</groupId>
+        <artifactId>testcontainers-openfga</artifactId>
+        <version>${testcontainers.version}</version>
+        <scope>test</scope>
+      </dependency>
+
       <dependency>
         <groupId>org.postgresql</groupId>
         <artifactId>postgresql</artifactId>

Reply via email to