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

exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new bad6528e42 NIFI-15100 Upgraded Testcontainers to 2.0.0 (#10428)
bad6528e42 is described below

commit bad6528e42e7c6fac3acf824f9bd6dde16c4a266
Author: Pierre Villard <[email protected]>
AuthorDate: Fri Oct 17 14:02:14 2025 +0200

    NIFI-15100 Upgraded Testcontainers to 2.0.0 (#10428)
    
    Signed-off-by: David Handermann <[email protected]>
---
 .../nifi-aws-bundle/nifi-aws-processors/pom.xml    |  2 +-
 .../aws/dynamodb/AbstractDynamoDBIT.java           |  7 ++-
 .../nifi/processors/aws/s3/AbstractS3IT.java       |  7 ++-
 .../apache/nifi/processors/aws/sns/ITPutSNS.java   |  7 ++-
 .../nifi/processors/aws/sqs/AbstractSQSIT.java     |  8 ++-
 .../nifi-couchbase-processors/pom.xml              |  7 +--
 .../couchbase/integration/AbstractCouchbaseIT.java | 19 ++++---
 .../nifi-elasticsearch-test-utils/pom.xml          |  2 +-
 .../integration/AbstractElasticsearchITBase.java   |  6 +--
 .../nifi-graph-processors/pom.xml                  |  2 +-
 .../nifi-neo4j-cypher-service/pom.xml              |  7 +--
 .../nifi/graph/ITNeo4JCypherClientServiceSSL.java  | 11 ++--
 .../nifi/graph/ITNeo4JCypherExecutorNoSSL.java     | 23 ++++++---
 .../nifi-other-graph-services/pom.xml              |  6 ---
 .../nifi-kafka-3-integration/pom.xml               |  7 +--
 .../kafka/processors/PublishKafkaTombstoneIT.java  |  2 +-
 .../PublishKafkaWrapperRecordTombstoneIT.java      |  2 +-
 .../nifi-kafka-service-shared/pom.xml              |  7 +--
 .../nifi-mongodb-processors/pom.xml                |  7 +--
 .../nifi/processors/mongodb/AbstractMongoIT.java   | 18 +++++--
 .../nifi-mongodb-services/pom.xml                  |  7 +--
 .../org/apache/nifi/mongodb/AbstractMongoIT.java   | 20 ++++++--
 .../nifi-redis-extensions/pom.xml                  |  5 --
 .../nifi/redis/state/ITRedisStateProvider.java     | 58 ++++++++++++++++------
 .../nifi-redis-bundle/nifi-redis-utils/pom.xml     |  6 ---
 .../org/apache/nifi/processors/smb/SmbDfsIT.java   | 18 +++++--
 .../nifi-smb-bundle/nifi-smb-smbj-client/pom.xml   |  2 +-
 .../nifi-standard-processors/pom.xml               |  4 +-
 .../processors/standard/PutDatabaseRecordIT.java   |  7 ++-
 .../processors/standard/QueryDatabaseTableIT.java  |  7 ++-
 .../standard/QueryDatabaseTableRecordIT.java       |  7 ++-
 .../nifi-registry-core/nifi-registry-test/pom.xml  |  6 +--
 .../registry/db/MariaDB10_3DataSourceFactory.java  |  2 +-
 .../nifi/registry/db/MariaDBCustomContainer.java   |  2 +-
 .../nifi/registry/db/MariaDBDataSourceFactory.java |  5 +-
 .../nifi/registry/db/MySql8DataSourceFactory.java  |  2 +-
 .../nifi/registry/db/MySqlCustomContainer.java     |  2 +-
 .../nifi/registry/db/MySqlDataSourceFactory.java   |  5 +-
 .../registry/db/Postgres10DataSourceFactory.java   |  6 +--
 .../registry/db/Postgres11DataSourceFactory.java   |  6 +--
 .../registry/db/Postgres12DataSourceFactory.java   |  6 +--
 .../registry/db/Postgres13DataSourceFactory.java   |  6 +--
 .../registry/db/Postgres14DataSourceFactory.java   |  6 +--
 nifi-registry/pom.xml                              |  2 +-
 pom.xml                                            |  2 +-
 45 files changed, 185 insertions(+), 171 deletions(-)

diff --git a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/pom.xml 
b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/pom.xml
index 8970ba4da9..ce2f47de84 100644
--- a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/pom.xml
+++ b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/pom.xml
@@ -283,7 +283,7 @@
         </dependency>
         <dependency>
             <groupId>org.testcontainers</groupId>
-            <artifactId>localstack</artifactId>
+            <artifactId>testcontainers-localstack</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git 
a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/dynamodb/AbstractDynamoDBIT.java
 
b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/dynamodb/AbstractDynamoDBIT.java
index 5685001664..c5d9f14790 100644
--- 
a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/dynamodb/AbstractDynamoDBIT.java
+++ 
b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/dynamodb/AbstractDynamoDBIT.java
@@ -22,7 +22,7 @@ import org.apache.nifi.util.TestRunner;
 import org.apache.nifi.util.TestRunners;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
-import org.testcontainers.containers.localstack.LocalStackContainer;
+import org.testcontainers.localstack.LocalStackContainer;
 import org.testcontainers.utility.DockerImageName;
 import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
 import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
@@ -55,8 +55,7 @@ public class AbstractDynamoDBIT {
 
     private static final DockerImageName localstackImage = 
DockerImageName.parse("localstack/localstack:latest");
 
-    private static final LocalStackContainer localstack = new 
LocalStackContainer(localstackImage)
-            .withServices(LocalStackContainer.Service.DYNAMODB);
+    private static final LocalStackContainer localstack = new 
LocalStackContainer(localstackImage).withServices("dynamodb");
 
     @BeforeAll
     public static void oneTimeSetup() {
@@ -108,7 +107,7 @@ public class AbstractDynamoDBIT {
         AuthUtils.enableAccessKey(runner, localstack.getAccessKey(), 
localstack.getSecretKey());
 
         runner.setProperty(AbstractDynamoDBProcessor.REGION, 
localstack.getRegion());
-        runner.setProperty(AbstractDynamoDBProcessor.ENDPOINT_OVERRIDE, 
localstack.getEndpointOverride(LocalStackContainer.Service.DYNAMODB).toString());
+        runner.setProperty(AbstractDynamoDBProcessor.ENDPOINT_OVERRIDE, 
localstack.getEndpoint().toString());
         return runner;
     }
 
diff --git 
a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/s3/AbstractS3IT.java
 
b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/s3/AbstractS3IT.java
index 27aa2e6119..13f20402fe 100644
--- 
a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/s3/AbstractS3IT.java
+++ 
b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/s3/AbstractS3IT.java
@@ -48,7 +48,7 @@ import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.BeforeEach;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.testcontainers.containers.localstack.LocalStackContainer;
+import org.testcontainers.localstack.LocalStackContainer;
 import org.testcontainers.utility.DockerImageName;
 
 import java.io.File;
@@ -85,8 +85,7 @@ public abstract class AbstractS3IT {
 
     private static final DockerImageName localstackImage = 
DockerImageName.parse("localstack/localstack:latest");
 
-    private static final LocalStackContainer localstack = new 
LocalStackContainer(localstackImage)
-            .withServices(LocalStackContainer.Service.S3, 
LocalStackContainer.Service.KMS);
+    private static final LocalStackContainer localstack = new 
LocalStackContainer(localstackImage).withServices("s3", "kms");
 
     @BeforeAll
     public static void oneTimeSetup() {
@@ -155,7 +154,7 @@ public abstract class AbstractS3IT {
     }
 
     protected String getEndpointOverride() {
-        return 
localstack.getEndpointOverride(LocalStackContainer.Service.S3).toString();
+        return localstack.getEndpoint().toString();
     }
 
     protected static String getRegion() {
diff --git 
a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/sns/ITPutSNS.java
 
b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/sns/ITPutSNS.java
index e7d0d2e216..bceeaf93e8 100644
--- 
a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/sns/ITPutSNS.java
+++ 
b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/sns/ITPutSNS.java
@@ -24,7 +24,7 @@ import org.apache.nifi.util.TestRunners;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
-import org.testcontainers.containers.localstack.LocalStackContainer;
+import org.testcontainers.localstack.LocalStackContainer;
 import org.testcontainers.utility.DockerImageName;
 import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
 import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
@@ -47,8 +47,7 @@ public class ITPutSNS {
 
     private static final DockerImageName localstackImage = 
DockerImageName.parse("localstack/localstack:latest");
 
-    private static final LocalStackContainer localstack = new 
LocalStackContainer(localstackImage)
-            .withServices(LocalStackContainer.Service.SNS);
+    private static final LocalStackContainer localstack = new 
LocalStackContainer(localstackImage).withServices("sns");
 
     private static final String CREDENTIALS_FILE = 
"src/test/resources/mock-aws-credentials.properties";
     private static String topicARN;
@@ -111,7 +110,7 @@ public class ITPutSNS {
     protected TestRunner initRunner(final Class<? extends Processor> 
processorClass) {
         TestRunner runner = TestRunners.newTestRunner(processorClass);
         runner.setProperty(AbstractAwsProcessor.REGION, 
localstack.getRegion());
-        runner.setProperty(AbstractAwsProcessor.ENDPOINT_OVERRIDE, 
localstack.getEndpointOverride(LocalStackContainer.Service.SNS).toString());
+        runner.setProperty(AbstractAwsProcessor.ENDPOINT_OVERRIDE, 
localstack.getEndpoint().toString());
         runner.setProperty(PutSNS.ARN, topicARN);
         return runner;
     }
diff --git 
a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/sqs/AbstractSQSIT.java
 
b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/sqs/AbstractSQSIT.java
index 378b38a07f..4553aa7baa 100644
--- 
a/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/sqs/AbstractSQSIT.java
+++ 
b/nifi-extension-bundles/nifi-aws-bundle/nifi-aws-processors/src/test/java/org/apache/nifi/processors/aws/sqs/AbstractSQSIT.java
@@ -24,7 +24,7 @@ import org.apache.nifi.util.TestRunner;
 import org.apache.nifi.util.TestRunners;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
-import org.testcontainers.containers.localstack.LocalStackContainer;
+import org.testcontainers.localstack.LocalStackContainer;
 import org.testcontainers.utility.DockerImageName;
 import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
 import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
@@ -38,8 +38,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 public abstract class AbstractSQSIT {
     private static final DockerImageName localstackImage = 
DockerImageName.parse("localstack/localstack:latest");
 
-    private static final LocalStackContainer localstack = new 
LocalStackContainer(localstackImage)
-            .withServices(LocalStackContainer.Service.SQS);
+    private static final LocalStackContainer localstack = new 
LocalStackContainer(localstackImage).withServices("sqs");
 
     private static String queueUrl;
     private static SqsClient client;
@@ -83,9 +82,8 @@ public abstract class AbstractSQSIT {
     protected TestRunner initRunner(final Class<? extends Processor> 
processorClass) {
         TestRunner runner = TestRunners.newTestRunner(processorClass);
         AuthUtils.enableAccessKey(runner, localstack.getAccessKey(), 
localstack.getSecretKey());
-
         runner.setProperty(AbstractAwsProcessor.REGION, 
localstack.getRegion());
-        runner.setProperty(AbstractAwsProcessor.ENDPOINT_OVERRIDE, 
localstack.getEndpointOverride(LocalStackContainer.Service.SQS).toString());
+        runner.setProperty(AbstractAwsProcessor.ENDPOINT_OVERRIDE, 
localstack.getEndpoint().toString());
         runner.setProperty("Queue URL", queueUrl);
         return runner;
     }
diff --git 
a/nifi-extension-bundles/nifi-couchbase-bundle/nifi-couchbase-processors/pom.xml
 
b/nifi-extension-bundles/nifi-couchbase-bundle/nifi-couchbase-processors/pom.xml
index 819228fad9..4a8178e8ef 100644
--- 
a/nifi-extension-bundles/nifi-couchbase-bundle/nifi-couchbase-processors/pom.xml
+++ 
b/nifi-extension-bundles/nifi-couchbase-bundle/nifi-couchbase-processors/pom.xml
@@ -53,15 +53,10 @@
         </dependency>
         <dependency>
             <groupId>org.testcontainers</groupId>
-            <artifactId>couchbase</artifactId>
+            <artifactId>testcontainers-couchbase</artifactId>
             <version>${testcontainers.version}</version>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.testcontainers</groupId>
-            <artifactId>junit-jupiter</artifactId>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 
 </project>
\ No newline at end of file
diff --git 
a/nifi-extension-bundles/nifi-couchbase-bundle/nifi-couchbase-processors/src/test/java/org/apache/nifi/processors/couchbase/integration/AbstractCouchbaseIT.java
 
b/nifi-extension-bundles/nifi-couchbase-bundle/nifi-couchbase-processors/src/test/java/org/apache/nifi/processors/couchbase/integration/AbstractCouchbaseIT.java
index dd38d231fa..edd0725f2d 100644
--- 
a/nifi-extension-bundles/nifi-couchbase-bundle/nifi-couchbase-processors/src/test/java/org/apache/nifi/processors/couchbase/integration/AbstractCouchbaseIT.java
+++ 
b/nifi-extension-bundles/nifi-couchbase-bundle/nifi-couchbase-processors/src/test/java/org/apache/nifi/processors/couchbase/integration/AbstractCouchbaseIT.java
@@ -19,16 +19,15 @@ package org.apache.nifi.processors.couchbase.integration;
 import org.apache.nifi.reporting.InitializationException;
 import org.apache.nifi.services.couchbase.StandardCouchbaseConnectionService;
 import org.apache.nifi.util.TestRunner;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
 import org.testcontainers.couchbase.BucketDefinition;
 import org.testcontainers.couchbase.CouchbaseContainer;
-import org.testcontainers.junit.jupiter.Container;
-import org.testcontainers.junit.jupiter.Testcontainers;
 
 import static 
org.apache.nifi.services.couchbase.StandardCouchbaseConnectionService.CONNECTION_STRING;
 import static 
org.apache.nifi.services.couchbase.StandardCouchbaseConnectionService.PASSWORD;
 import static 
org.apache.nifi.services.couchbase.StandardCouchbaseConnectionService.USERNAME;
 
-@Testcontainers
 public class AbstractCouchbaseIT {
 
     protected static final String TEST_BUCKET_NAME = "test_bucket";
@@ -45,9 +44,7 @@ public class AbstractCouchbaseIT {
 
     protected static TestRunner runner;
 
-    @Container
-    protected static CouchbaseContainer container = new 
CouchbaseContainer(COUCHBASE_IMAGE_COMMUNITY_RECENT)
-            .withBucket(new BucketDefinition(TEST_BUCKET_NAME));
+    protected static CouchbaseContainer container = new 
CouchbaseContainer(COUCHBASE_IMAGE_COMMUNITY_RECENT).withBucket(new 
BucketDefinition(TEST_BUCKET_NAME));
 
     protected void initConnectionService() throws InitializationException {
         final StandardCouchbaseConnectionService connectionService = new 
StandardCouchbaseConnectionService();
@@ -58,4 +55,14 @@ public class AbstractCouchbaseIT {
         runner.setValidateExpressionUsage(false);
         runner.enableControllerService(connectionService);
     }
+
+    @BeforeAll
+    public static void start() {
+        container.start();
+    }
+
+    @AfterAll
+    public static void stop() {
+        container.stop();
+    }
 }
diff --git 
a/nifi-extension-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-test-utils/pom.xml
 
b/nifi-extension-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-test-utils/pom.xml
index c0d7ec00cc..55ed35ca53 100644
--- 
a/nifi-extension-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-test-utils/pom.xml
+++ 
b/nifi-extension-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-test-utils/pom.xml
@@ -65,7 +65,7 @@ language governing permissions and limitations under the 
License. -->
         </dependency>
         <dependency>
             <groupId>org.testcontainers</groupId>
-            <artifactId>elasticsearch</artifactId>
+            <artifactId>testcontainers-elasticsearch</artifactId>
             <scope>compile</scope>
         </dependency>
         <dependency>
diff --git 
a/nifi-extension-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-test-utils/src/main/java/org/apache/nifi/elasticsearch/integration/AbstractElasticsearchITBase.java
 
b/nifi-extension-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-test-utils/src/main/java/org/apache/nifi/elasticsearch/integration/AbstractElasticsearchITBase.java
index 28d4ba9e4a..a27b0c195d 100644
--- 
a/nifi-extension-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-test-utils/src/main/java/org/apache/nifi/elasticsearch/integration/AbstractElasticsearchITBase.java
+++ 
b/nifi-extension-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-test-utils/src/main/java/org/apache/nifi/elasticsearch/integration/AbstractElasticsearchITBase.java
@@ -22,6 +22,7 @@ import com.github.dockerjava.api.model.ExposedPort;
 import com.github.dockerjava.api.model.HostConfig;
 import com.github.dockerjava.api.model.PortBinding;
 import com.github.dockerjava.api.model.Ports;
+import org.apache.commons.lang3.RandomStringUtils;
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpHost;
 import org.apache.http.auth.UsernamePasswordCredentials;
@@ -34,7 +35,6 @@ import org.elasticsearch.client.ResponseException;
 import org.elasticsearch.client.RestClient;
 import org.junit.jupiter.api.BeforeAll;
 import org.testcontainers.elasticsearch.ElasticsearchContainer;
-import org.testcontainers.shaded.org.apache.commons.lang3.RandomStringUtils;
 import org.testcontainers.utility.DockerImageName;
 
 import java.io.BufferedReader;
@@ -52,8 +52,8 @@ import static org.apache.http.auth.AuthScope.ANY;
 public abstract class AbstractElasticsearchITBase {
     // default Elasticsearch version should (ideally) match that in the 
nifi-elasticsearch-bundle#pom.xml for the integration-tests profile
     protected static final DockerImageName IMAGE = DockerImageName
-            .parse(System.getProperty("elasticsearch.docker.image", 
"docker.elastic.co/elasticsearch/elasticsearch:9.0.2"));
-    protected static final String ELASTIC_USER_PASSWORD = 
System.getProperty("elasticsearch.elastic_user.password", 
RandomStringUtils.randomAlphanumeric(10, 20));
+            .parse(System.getProperty("elasticsearch.docker.image", 
"docker.elastic.co/elasticsearch/elasticsearch:9.1.5"));
+    protected static final String ELASTIC_USER_PASSWORD = 
System.getProperty("elasticsearch.elastic_user.password", 
RandomStringUtils.insecure().nextAlphanumeric(10, 20));
     private static final int PORT = 9200;
     protected static final ElasticsearchContainer ELASTICSEARCH_CONTAINER = 
new ElasticsearchContainer(IMAGE)
             .withPassword(ELASTIC_USER_PASSWORD)
diff --git 
a/nifi-extension-bundles/nifi-graph-bundle/nifi-graph-processors/pom.xml 
b/nifi-extension-bundles/nifi-graph-bundle/nifi-graph-processors/pom.xml
index 90b79cba72..4c622874ed 100644
--- a/nifi-extension-bundles/nifi-graph-bundle/nifi-graph-processors/pom.xml
+++ b/nifi-extension-bundles/nifi-graph-bundle/nifi-graph-processors/pom.xml
@@ -92,7 +92,7 @@
 
         <dependency>
             <groupId>org.testcontainers</groupId>
-            <artifactId>neo4j</artifactId>
+            <artifactId>testcontainers-neo4j</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git 
a/nifi-extension-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/pom.xml 
b/nifi-extension-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/pom.xml
index bc2bb9ec03..a88e4b9786 100644
--- a/nifi-extension-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/pom.xml
+++ b/nifi-extension-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/pom.xml
@@ -75,12 +75,7 @@
         </dependency>
         <dependency>
             <groupId>org.testcontainers</groupId>
-            <artifactId>junit-jupiter</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.testcontainers</groupId>
-            <artifactId>neo4j</artifactId>
+            <artifactId>testcontainers-neo4j</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git 
a/nifi-extension-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/src/test/java/org/apache/nifi/graph/ITNeo4JCypherClientServiceSSL.java
 
b/nifi-extension-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/src/test/java/org/apache/nifi/graph/ITNeo4JCypherClientServiceSSL.java
index 6d53cc52aa..281cf4a223 100644
--- 
a/nifi-extension-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/src/test/java/org/apache/nifi/graph/ITNeo4JCypherClientServiceSSL.java
+++ 
b/nifi-extension-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/src/test/java/org/apache/nifi/graph/ITNeo4JCypherClientServiceSSL.java
@@ -24,12 +24,12 @@ import org.apache.nifi.util.TestRunners;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
-import org.testcontainers.containers.Neo4jContainer;
 import org.testcontainers.images.builder.Transferable;
-import org.testcontainers.junit.jupiter.Testcontainers;
+import org.testcontainers.neo4j.Neo4jContainer;
 import org.testcontainers.utility.DockerImageName;
 
 import javax.security.auth.x500.X500Principal;
+
 import java.io.IOException;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
@@ -56,13 +56,12 @@ import static 
org.apache.nifi.graph.Neo4JCypherClientService.SSL_TRUST_STORE_FIL
 import static org.apache.nifi.graph.Neo4JCypherClientService.USERNAME;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
-@Testcontainers
 public class ITNeo4JCypherClientServiceSSL {
     private static final String ADMIN_USER = "neo4j";
 
     private static final String ADMIN_ACCESS = UUID.randomUUID().toString();
 
-    private static final String IMAGE_NAME = 
System.getProperty("neo4j.docker.image", "neo4j:5.19");
+    private static final String IMAGE_NAME = 
System.getProperty("neo4j.docker.image", "neo4j:2025.09");
 
     private static final Map<String, String> CONTAINER_ENVIRONMENT = new 
LinkedHashMap<>();
 
@@ -88,7 +87,7 @@ public class ITNeo4JCypherClientServiceSSL {
 
     private static final String CONTAINER_KEY_PATH = String.format("%s/%s", 
SSL_DIRECTORY, KEY_FILE);
 
-    private static Neo4jContainer<?> container;
+    private static Neo4jContainer container;
 
     private static String trustStoreFilePath;
 
@@ -96,7 +95,7 @@ public class ITNeo4JCypherClientServiceSSL {
 
     @BeforeAll
     public static void setContainerEnvironment() throws Exception {
-        container = new 
Neo4jContainer<>(DockerImageName.parse(IMAGE_NAME)).withAdminPassword(ADMIN_ACCESS);
+        container = new 
Neo4jContainer(DockerImageName.parse(IMAGE_NAME)).withAdminPassword(ADMIN_ACCESS);
         setCertificatePrivateKey();
 
         // Set Neo4j Environment Variables based on 
https://neo4j.com/developer/kb/setting-up-ssl-with-docker/
diff --git 
a/nifi-extension-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/src/test/java/org/apache/nifi/graph/ITNeo4JCypherExecutorNoSSL.java
 
b/nifi-extension-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/src/test/java/org/apache/nifi/graph/ITNeo4JCypherExecutorNoSSL.java
index 1096428c4d..d329ce28a8 100644
--- 
a/nifi-extension-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/src/test/java/org/apache/nifi/graph/ITNeo4JCypherExecutorNoSSL.java
+++ 
b/nifi-extension-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/src/test/java/org/apache/nifi/graph/ITNeo4JCypherExecutorNoSSL.java
@@ -19,7 +19,9 @@ package org.apache.nifi.graph;
 import org.apache.nifi.util.NoOpProcessor;
 import org.apache.nifi.util.TestRunner;
 import org.apache.nifi.util.TestRunners;
+import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
@@ -28,9 +30,7 @@ import org.neo4j.driver.Driver;
 import org.neo4j.driver.GraphDatabase;
 import org.neo4j.driver.Record;
 import org.neo4j.driver.Session;
-import org.testcontainers.containers.Neo4jContainer;
-import org.testcontainers.junit.jupiter.Container;
-import org.testcontainers.junit.jupiter.Testcontainers;
+import org.testcontainers.neo4j.Neo4jContainer;
 import org.testcontainers.utility.DockerImageName;
 
 import java.util.ArrayList;
@@ -43,13 +43,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 /**
  * Neo4J Cypher integration tests.
  */
-@Testcontainers
 @DisabledIfSystemProperty(named = "neo4j.ssl.test", matches = "true")
 public class ITNeo4JCypherExecutorNoSSL {
-    @Container
-    private static Neo4jContainer<?> neo4jContainer =
-            new 
Neo4jContainer<>(DockerImageName.parse(System.getProperty("neo4j.docker.image")))
-                    .withAdminPassword("testing1234");
+
+    private static Neo4jContainer neo4jContainer = new 
Neo4jContainer(DockerImageName.parse(System.getProperty("neo4j.docker.image"))).withAdminPassword("testing1234");
 
     protected TestRunner runner;
     protected Driver driver;
@@ -59,6 +56,16 @@ public class ITNeo4JCypherExecutorNoSSL {
     private GraphClientService clientService;
     private GraphQueryResultCallback EMPTY_CALLBACK = (record, hasMore) -> { };
 
+    @BeforeAll
+    public static void start() {
+        neo4jContainer.start();
+    }
+
+    @AfterAll
+    public static void stop() {
+        neo4jContainer.stop();
+    }
+
     @BeforeEach
     public void setUp() throws Exception {
         clientService = new Neo4JCypherClientService();
diff --git 
a/nifi-extension-bundles/nifi-graph-bundle/nifi-other-graph-services/pom.xml 
b/nifi-extension-bundles/nifi-graph-bundle/nifi-other-graph-services/pom.xml
index 0315b1f01c..c75f8e85f1 100644
--- a/nifi-extension-bundles/nifi-graph-bundle/nifi-other-graph-services/pom.xml
+++ b/nifi-extension-bundles/nifi-graph-bundle/nifi-other-graph-services/pom.xml
@@ -96,12 +96,6 @@
             <artifactId>testcontainers</artifactId>
             <scope>test</scope>
         </dependency>
-
-        <dependency>
-            <groupId>org.testcontainers</groupId>
-            <artifactId>junit-jupiter</artifactId>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 
     <build>
diff --git 
a/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-3-integration/pom.xml 
b/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-3-integration/pom.xml
index 3073bc0704..6faf0f393f 100644
--- a/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-3-integration/pom.xml
+++ b/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-3-integration/pom.xml
@@ -82,12 +82,7 @@
         </dependency>
         <dependency>
             <groupId>org.testcontainers</groupId>
-            <artifactId>junit-jupiter</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.testcontainers</groupId>
-            <artifactId>kafka</artifactId>
+            <artifactId>testcontainers-kafka</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git 
a/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-3-integration/src/test/java/org/apache/nifi/kafka/processors/PublishKafkaTombstoneIT.java
 
b/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-3-integration/src/test/java/org/apache/nifi/kafka/processors/PublishKafkaTombstoneIT.java
index 7a35de913f..026089519c 100644
--- 
a/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-3-integration/src/test/java/org/apache/nifi/kafka/processors/PublishKafkaTombstoneIT.java
+++ 
b/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-3-integration/src/test/java/org/apache/nifi/kafka/processors/PublishKafkaTombstoneIT.java
@@ -35,8 +35,8 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import static org.junit.Assert.assertNull;
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 @TestMethodOrder(MethodOrderer.MethodName.class)
 public class PublishKafkaTombstoneIT extends AbstractPublishKafkaIT {
diff --git 
a/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-3-integration/src/test/java/org/apache/nifi/kafka/processors/PublishKafkaWrapperRecordTombstoneIT.java
 
b/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-3-integration/src/test/java/org/apache/nifi/kafka/processors/PublishKafkaWrapperRecordTombstoneIT.java
index fa6c1eb465..b264488cc7 100644
--- 
a/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-3-integration/src/test/java/org/apache/nifi/kafka/processors/PublishKafkaWrapperRecordTombstoneIT.java
+++ 
b/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-3-integration/src/test/java/org/apache/nifi/kafka/processors/PublishKafkaWrapperRecordTombstoneIT.java
@@ -39,9 +39,9 @@ import java.util.List;
 import java.util.Map;
 import java.util.Objects;
 
-import static org.junit.Assert.assertNull;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 @TestMethodOrder(MethodOrderer.MethodName.class)
 public class PublishKafkaWrapperRecordTombstoneIT extends 
AbstractPublishKafkaIT {
diff --git 
a/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-service-shared/pom.xml 
b/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-service-shared/pom.xml
index 821b43b6f5..fc2e531649 100644
--- a/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-service-shared/pom.xml
+++ b/nifi-extension-bundles/nifi-kafka-bundle/nifi-kafka-service-shared/pom.xml
@@ -59,12 +59,7 @@
         </dependency>
         <dependency>
             <groupId>org.testcontainers</groupId>
-            <artifactId>junit-jupiter</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.testcontainers</groupId>
-            <artifactId>kafka</artifactId>
+            <artifactId>testcontainers-kafka</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git 
a/nifi-extension-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/pom.xml 
b/nifi-extension-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/pom.xml
index a214ab0fbe..195fb9b40d 100644
--- a/nifi-extension-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/pom.xml
+++ b/nifi-extension-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/pom.xml
@@ -97,12 +97,7 @@
         </dependency>
         <dependency>
             <groupId>org.testcontainers</groupId>
-            <artifactId>junit-jupiter</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.testcontainers</groupId>
-            <artifactId>mongodb</artifactId>
+            <artifactId>testcontainers-mongodb</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git 
a/nifi-extension-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/test/java/org/apache/nifi/processors/mongodb/AbstractMongoIT.java
 
b/nifi-extension-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/test/java/org/apache/nifi/processors/mongodb/AbstractMongoIT.java
index 651bd9f26a..07e992fe3a 100644
--- 
a/nifi-extension-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/test/java/org/apache/nifi/processors/mongodb/AbstractMongoIT.java
+++ 
b/nifi-extension-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/test/java/org/apache/nifi/processors/mongodb/AbstractMongoIT.java
@@ -19,14 +19,22 @@
 
 package org.apache.nifi.processors.mongodb;
 
-import org.testcontainers.containers.MongoDBContainer;
-import org.testcontainers.junit.jupiter.Container;
-import org.testcontainers.junit.jupiter.Testcontainers;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.testcontainers.mongodb.MongoDBContainer;
 import org.testcontainers.utility.DockerImageName;
 
-@Testcontainers
 public class AbstractMongoIT {
     private static final String DOCKER_IMAGE = 
System.getProperty("mongo.docker.image", "mongo:8");
-    @Container
     protected static final MongoDBContainer MONGO_CONTAINER = new 
MongoDBContainer(DockerImageName.parse(DOCKER_IMAGE));
+
+    @BeforeAll
+    public static void start() {
+        MONGO_CONTAINER.start();
+    }
+
+    @AfterAll
+    public static void stop() {
+        MONGO_CONTAINER.stop();
+    }
 }
diff --git 
a/nifi-extension-bundles/nifi-mongodb-bundle/nifi-mongodb-services/pom.xml 
b/nifi-extension-bundles/nifi-mongodb-bundle/nifi-mongodb-services/pom.xml
index 11778c2a56..1c17b26ca0 100644
--- a/nifi-extension-bundles/nifi-mongodb-bundle/nifi-mongodb-services/pom.xml
+++ b/nifi-extension-bundles/nifi-mongodb-bundle/nifi-mongodb-services/pom.xml
@@ -67,12 +67,7 @@
         </dependency>
         <dependency>
             <groupId>org.testcontainers</groupId>
-            <artifactId>junit-jupiter</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.testcontainers</groupId>
-            <artifactId>mongodb</artifactId>
+            <artifactId>testcontainers-mongodb</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git 
a/nifi-extension-bundles/nifi-mongodb-bundle/nifi-mongodb-services/src/test/java/org/apache/nifi/mongodb/AbstractMongoIT.java
 
b/nifi-extension-bundles/nifi-mongodb-bundle/nifi-mongodb-services/src/test/java/org/apache/nifi/mongodb/AbstractMongoIT.java
index 5ecf11b0b1..272fb7f6bd 100644
--- 
a/nifi-extension-bundles/nifi-mongodb-bundle/nifi-mongodb-services/src/test/java/org/apache/nifi/mongodb/AbstractMongoIT.java
+++ 
b/nifi-extension-bundles/nifi-mongodb-bundle/nifi-mongodb-services/src/test/java/org/apache/nifi/mongodb/AbstractMongoIT.java
@@ -19,14 +19,24 @@
 
 package org.apache.nifi.mongodb;
 
-import org.testcontainers.containers.MongoDBContainer;
-import org.testcontainers.junit.jupiter.Container;
-import org.testcontainers.junit.jupiter.Testcontainers;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.testcontainers.mongodb.MongoDBContainer;
 import org.testcontainers.utility.DockerImageName;
 
-@Testcontainers
 public class AbstractMongoIT {
+
     private static final String DOCKER_IMAGE = 
System.getProperty("mongo.docker.image", "mongo:8");
-    @Container
     protected static final MongoDBContainer MONGO_CONTAINER = new 
MongoDBContainer(DockerImageName.parse(DOCKER_IMAGE));
+
+    @BeforeAll
+    public static void start() {
+        MONGO_CONTAINER.start();
+    }
+
+    @AfterAll
+    public static void stop() {
+        MONGO_CONTAINER.stop();
+    }
+
 }
diff --git 
a/nifi-extension-bundles/nifi-redis-bundle/nifi-redis-extensions/pom.xml 
b/nifi-extension-bundles/nifi-redis-bundle/nifi-redis-extensions/pom.xml
index 9b20e5ad7b..bf65c2b6b6 100644
--- a/nifi-extension-bundles/nifi-redis-bundle/nifi-redis-extensions/pom.xml
+++ b/nifi-extension-bundles/nifi-redis-bundle/nifi-redis-extensions/pom.xml
@@ -100,10 +100,5 @@
             <artifactId>testcontainers</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.testcontainers</groupId>
-            <artifactId>junit-jupiter</artifactId>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 </project>
diff --git 
a/nifi-extension-bundles/nifi-redis-bundle/nifi-redis-extensions/src/test/java/org/apache/nifi/redis/state/ITRedisStateProvider.java
 
b/nifi-extension-bundles/nifi-redis-bundle/nifi-redis-extensions/src/test/java/org/apache/nifi/redis/state/ITRedisStateProvider.java
index 757577b8f5..13cfe99bb4 100644
--- 
a/nifi-extension-bundles/nifi-redis-bundle/nifi-redis-extensions/src/test/java/org/apache/nifi/redis/state/ITRedisStateProvider.java
+++ 
b/nifi-extension-bundles/nifi-redis-bundle/nifi-redis-extensions/src/test/java/org/apache/nifi/redis/state/ITRedisStateProvider.java
@@ -16,15 +16,6 @@
  */
 package org.apache.nifi.redis.state;
 
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Optional;
-import javax.net.ssl.SSLContext;
 import org.apache.nifi.attribute.expression.language.StandardPropertyValue;
 import org.apache.nifi.components.PropertyDescriptor;
 import org.apache.nifi.components.PropertyValue;
@@ -35,11 +26,23 @@ import org.apache.nifi.logging.ComponentLog;
 import org.apache.nifi.redis.testcontainers.RedisContainer;
 import org.apache.nifi.redis.util.RedisUtils;
 import org.apache.nifi.util.MockComponentLog;
+import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
-import org.testcontainers.junit.jupiter.Container;
-import org.testcontainers.junit.jupiter.Testcontainers;
+import org.testcontainers.containers.Container;
+
+import javax.net.ssl.SSLContext;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Optional;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -50,19 +53,26 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
  * NOTE: These test cases should be kept in-sync with 
AbstractTestStateProvider which is in the framework
  * and couldn't be extended here.
  */
-@Testcontainers
 public class ITRedisStateProvider {
 
     protected final String componentId = 
"111111111-1111-1111-1111-111111111111";
-
-    @Container
-    public RedisContainer redisContainer = new 
RedisContainer("redis:7.0.12-alpine")
-            .withExposedPorts(6379);
+    public static RedisContainer redisContainer = new 
RedisContainer("redis:8.2.2-alpine").withExposedPorts(6379);
 
     private RedisStateProvider provider;
 
+    @BeforeAll
+    public static void start() {
+        redisContainer.start();
+    }
+
+    @AfterAll
+    public static void stop() {
+        redisContainer.stop();
+    }
+
     @BeforeEach
     public void setup() {
+        flushDatabase();
         final Map<PropertyDescriptor, String> properties = new HashMap<>();
         properties.put(RedisUtils.CONNECTION_STRING, redisContainer.getHost() 
+ ":" + redisContainer.getFirstMappedPort());
         this.provider = createProvider(properties);
@@ -78,6 +88,7 @@ public class ITRedisStateProvider {
             provider.disable();
             provider.shutdown();
         }
+        flushDatabase();
     }
 
     public StateProvider getProvider() {
@@ -365,4 +376,19 @@ public class ITRedisStateProvider {
         provider.enable();
         return provider;
     }
+
+    private static void flushDatabase() {
+        try {
+            final Container.ExecResult execResult = 
redisContainer.execInContainer("redis-cli", "flushall");
+            if (execResult.getExitCode() != 0) {
+                throw new IllegalStateException(String.format("Failed to flush 
Redis container: %s%s",
+                        execResult.getStdout(), execResult.getStderr()));
+            }
+        } catch (InterruptedException interruptedException) {
+            Thread.currentThread().interrupt();
+            throw new IllegalStateException("Interrupted while flushing Redis 
container", interruptedException);
+        } catch (IOException ioException) {
+            throw new IllegalStateException("Failed to flush Redis container", 
ioException);
+        }
+    }
 }
diff --git a/nifi-extension-bundles/nifi-redis-bundle/nifi-redis-utils/pom.xml 
b/nifi-extension-bundles/nifi-redis-bundle/nifi-redis-utils/pom.xml
index dbcce1f636..3ba3cdba1b 100644
--- a/nifi-extension-bundles/nifi-redis-bundle/nifi-redis-utils/pom.xml
+++ b/nifi-extension-bundles/nifi-redis-bundle/nifi-redis-utils/pom.xml
@@ -53,11 +53,5 @@
             <groupId>org.apache.nifi</groupId>
             <artifactId>nifi-utils</artifactId>
         </dependency>
-
-        <dependency>
-            <groupId>org.testcontainers</groupId>
-            <artifactId>junit-jupiter</artifactId>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 </project>
diff --git 
a/nifi-extension-bundles/nifi-smb-bundle/nifi-smb-processors/src/test/java/org/apache/nifi/processors/smb/SmbDfsIT.java
 
b/nifi-extension-bundles/nifi-smb-bundle/nifi-smb-processors/src/test/java/org/apache/nifi/processors/smb/SmbDfsIT.java
index 911fc30111..ed9c8723a6 100644
--- 
a/nifi-extension-bundles/nifi-smb-bundle/nifi-smb-processors/src/test/java/org/apache/nifi/processors/smb/SmbDfsIT.java
+++ 
b/nifi-extension-bundles/nifi-smb-bundle/nifi-smb-processors/src/test/java/org/apache/nifi/processors/smb/SmbDfsIT.java
@@ -16,6 +16,11 @@
  */
 package org.apache.nifi.processors.smb;
 
+import com.github.dockerjava.api.model.ExposedPort;
+import com.github.dockerjava.api.model.HostConfig;
+import com.github.dockerjava.api.model.PortBinding;
+import com.github.dockerjava.api.model.Ports;
+import org.apache.commons.io.IOUtils;
 import org.apache.nifi.flowfile.attributes.CoreAttributes;
 import org.apache.nifi.reporting.InitializationException;
 import org.apache.nifi.services.smb.SmbjClientProviderService;
@@ -28,12 +33,11 @@ import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.testcontainers.containers.FixedHostPortGenericContainer;
 import org.testcontainers.containers.GenericContainer;
 import org.testcontainers.containers.output.Slf4jLogConsumer;
 import org.testcontainers.containers.wait.strategy.Wait;
 import org.testcontainers.images.builder.Transferable;
-import org.testcontainers.shaded.org.apache.commons.io.IOUtils;
+import org.testcontainers.utility.DockerImageName;
 
 import java.nio.charset.StandardCharsets;
 import java.util.Map;
@@ -56,8 +60,14 @@ class SmbDfsIT {
     private static final int DEFAULT_SMB_PORT = 445;
 
     // DFS works only on the default SMB port (445). Not sure if it is a 
generic DFS vs Samba DFS constraint, or an issue in the smbj client library.
-    private final GenericContainer<?> sambaContainer = new 
FixedHostPortGenericContainer<>("dperson/samba")
-            .withFixedExposedPort(DEFAULT_SMB_PORT, DEFAULT_SMB_PORT)
+    private final GenericContainer<?> sambaContainer = new 
GenericContainer<>(DockerImageName.parse("dperson/samba"))
+            .withExposedPorts(DEFAULT_SMB_PORT)
+            .withCreateContainerCmdModifier(cmd -> {
+                final HostConfig hostConfig = cmd.getHostConfig() != null ? 
cmd.getHostConfig() : new HostConfig();
+                final PortBinding portBinding = new 
PortBinding(Ports.Binding.bindPort(DEFAULT_SMB_PORT), new 
ExposedPort(DEFAULT_SMB_PORT));
+                hostConfig.withPortBindings(portBinding);
+                cmd.withHostConfig(hostConfig);
+            })
             .waitingFor(Wait.forListeningPort())
             .withLogConsumer(new Slf4jLogConsumer(LOGGER))
             .withCommand("-u", "myuser;mypass",
diff --git 
a/nifi-extension-bundles/nifi-smb-bundle/nifi-smb-smbj-client/pom.xml 
b/nifi-extension-bundles/nifi-smb-bundle/nifi-smb-smbj-client/pom.xml
index 1dee82fb48..f11f785df4 100644
--- a/nifi-extension-bundles/nifi-smb-bundle/nifi-smb-smbj-client/pom.xml
+++ b/nifi-extension-bundles/nifi-smb-bundle/nifi-smb-smbj-client/pom.xml
@@ -57,7 +57,7 @@
         </dependency>
         <dependency>
             <groupId>org.testcontainers</groupId>
-            <artifactId>toxiproxy</artifactId>
+            <artifactId>testcontainers-toxiproxy</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git 
a/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml 
b/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
index 2460568b57..7517e6f1aa 100644
--- 
a/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
+++ 
b/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/pom.xml
@@ -102,7 +102,7 @@
         </dependency>
         <dependency>
             <groupId>org.testcontainers</groupId>
-            <artifactId>jdbc</artifactId>
+            <artifactId>testcontainers-jdbc</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -557,7 +557,7 @@
         <!-- Test Dependencies for database processors -->
         <dependency>
             <groupId>org.testcontainers</groupId>
-            <artifactId>postgresql</artifactId>
+            <artifactId>testcontainers-postgresql</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git 
a/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/PutDatabaseRecordIT.java
 
b/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/PutDatabaseRecordIT.java
index a0dbc204ac..e525ca0efe 100644
--- 
a/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/PutDatabaseRecordIT.java
+++ 
b/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/PutDatabaseRecordIT.java
@@ -28,7 +28,7 @@ import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
-import org.testcontainers.containers.PostgreSQLContainer;
+import org.testcontainers.postgresql.PostgreSQLContainer;
 
 import java.sql.Connection;
 import java.sql.Date;
@@ -67,14 +67,13 @@ public class PutDatabaseRecordIT {
     private static final String FAVORITE_COLOR_FIELD = "favorite_color";
     private static final String FAVORITE_COLOR = "blue";
 
-    private static PostgreSQLContainer<?> postgres;
+    private static PostgreSQLContainer postgres;
     private TestRunner runner;
 
 
     @BeforeAll
     public static void startPostgres() {
-        postgres = new PostgreSQLContainer<>("postgres:9.6.12")
-            .withInitScript("PutDatabaseRecordIT/create-person-table.sql");
+        postgres = new 
PostgreSQLContainer("postgres:latest").withInitScript("PutDatabaseRecordIT/create-person-table.sql");
         postgres.start();
     }
 
diff --git 
a/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/QueryDatabaseTableIT.java
 
b/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/QueryDatabaseTableIT.java
index aefa407681..0eb130de52 100644
--- 
a/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/QueryDatabaseTableIT.java
+++ 
b/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/QueryDatabaseTableIT.java
@@ -21,15 +21,14 @@ import org.apache.nifi.dbcp.utils.DBCPProperties;
 import org.apache.nifi.reporting.InitializationException;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
-import org.testcontainers.containers.PostgreSQLContainer;
+import org.testcontainers.postgresql.PostgreSQLContainer;
 
 public class QueryDatabaseTableIT extends QueryDatabaseTableTest {
-    private static PostgreSQLContainer<?> postgres;
+    private static PostgreSQLContainer postgres;
 
     @BeforeAll
     public static void setupBeforeClass() {
-        postgres = new PostgreSQLContainer<>("postgres:9.6.12")
-                .withInitScript("PutDatabaseRecordIT/create-person-table.sql");
+        postgres = new 
PostgreSQLContainer("postgres:latest").withInitScript("PutDatabaseRecordIT/create-person-table.sql");
         postgres.start();
     }
 
diff --git 
a/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/QueryDatabaseTableRecordIT.java
 
b/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/QueryDatabaseTableRecordIT.java
index 391cead1b5..5c8ad9ed6c 100644
--- 
a/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/QueryDatabaseTableRecordIT.java
+++ 
b/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/QueryDatabaseTableRecordIT.java
@@ -21,15 +21,14 @@ import org.apache.nifi.dbcp.utils.DBCPProperties;
 import org.apache.nifi.reporting.InitializationException;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
-import org.testcontainers.containers.PostgreSQLContainer;
+import org.testcontainers.postgresql.PostgreSQLContainer;
 
 public class QueryDatabaseTableRecordIT extends QueryDatabaseTableRecordTest {
-    private static PostgreSQLContainer<?> postgres;
+    private static PostgreSQLContainer postgres;
 
     @BeforeAll
     public static void setupBeforeClass() {
-        postgres = new PostgreSQLContainer<>("postgres:9.6.12")
-                .withInitScript("PutDatabaseRecordIT/create-person-table.sql");
+        postgres = new 
PostgreSQLContainer("postgres:latest").withInitScript("PutDatabaseRecordIT/create-person-table.sql");
         postgres.start();
     }
 
diff --git a/nifi-registry/nifi-registry-core/nifi-registry-test/pom.xml 
b/nifi-registry/nifi-registry-core/nifi-registry-test/pom.xml
index 791c03fc97..c6fe951660 100644
--- a/nifi-registry/nifi-registry-core/nifi-registry-test/pom.xml
+++ b/nifi-registry/nifi-registry-core/nifi-registry-test/pom.xml
@@ -49,15 +49,15 @@
         </dependency>
         <dependency>
             <groupId>org.testcontainers</groupId>
-            <artifactId>mysql</artifactId>
+            <artifactId>testcontainers-mysql</artifactId>
         </dependency>
         <dependency>
             <groupId>org.testcontainers</groupId>
-            <artifactId>mariadb</artifactId>
+            <artifactId>testcontainers-mariadb</artifactId>
         </dependency>
         <dependency>
             <groupId>org.testcontainers</groupId>
-            <artifactId>postgresql</artifactId>
+            <artifactId>testcontainers-postgresql</artifactId>
         </dependency>
         <dependency>
             <groupId>com.mysql</groupId>
diff --git 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_3DataSourceFactory.java
 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_3DataSourceFactory.java
index 92389f1abc..eb255227b2 100644
--- 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_3DataSourceFactory.java
+++ 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDB10_3DataSourceFactory.java
@@ -18,7 +18,7 @@ package org.apache.nifi.registry.db;
 
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Profile;
-import org.testcontainers.containers.MariaDBContainer;
+import org.testcontainers.mariadb.MariaDBContainer;
 
 @Configuration
 @Profile("mariadb-10-3")
diff --git 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDBCustomContainer.java
 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDBCustomContainer.java
index 3a99312817..906c8152be 100644
--- 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDBCustomContainer.java
+++ 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDBCustomContainer.java
@@ -16,7 +16,7 @@
  */
 package org.apache.nifi.registry.db;
 
-import org.testcontainers.containers.MariaDBContainer;
+import org.testcontainers.mariadb.MariaDBContainer;
 
 /**
  * Custom container to override the JDBC URL and add additional query 
parameters.
diff --git 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDBDataSourceFactory.java
 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDBDataSourceFactory.java
index 0affb02a36..b35a059a78 100644
--- 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDBDataSourceFactory.java
+++ 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MariaDBDataSourceFactory.java
@@ -16,13 +16,14 @@
  */
 package org.apache.nifi.registry.db;
 
+import jakarta.annotation.PostConstruct;
 import org.mariadb.jdbc.MariaDbDataSource;
-import org.testcontainers.containers.MariaDBContainer;
 import org.testcontainers.delegate.DatabaseDelegate;
 import org.testcontainers.jdbc.JdbcDatabaseDelegate;
+import org.testcontainers.mariadb.MariaDBContainer;
 
-import jakarta.annotation.PostConstruct;
 import javax.sql.DataSource;
+
 import java.sql.SQLException;
 
 public abstract class MariaDBDataSourceFactory extends TestDataSourceFactory {
diff --git 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MySql8DataSourceFactory.java
 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MySql8DataSourceFactory.java
index b069438cf0..4fb4430d65 100644
--- 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MySql8DataSourceFactory.java
+++ 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MySql8DataSourceFactory.java
@@ -18,7 +18,7 @@ package org.apache.nifi.registry.db;
 
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Profile;
-import org.testcontainers.containers.MySQLContainer;
+import org.testcontainers.mysql.MySQLContainer;
 
 @Configuration
 @Profile({"mysql", "mysql-8"})
diff --git 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MySqlCustomContainer.java
 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MySqlCustomContainer.java
index 202a030e39..d7f0151b56 100644
--- 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MySqlCustomContainer.java
+++ 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MySqlCustomContainer.java
@@ -16,7 +16,7 @@
  */
 package org.apache.nifi.registry.db;
 
-import org.testcontainers.containers.MySQLContainer;
+import org.testcontainers.mysql.MySQLContainer;
 
 /**
  * Custom container to override the JDBC URL and add additional query 
parameters.
diff --git 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MySqlDataSourceFactory.java
 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MySqlDataSourceFactory.java
index 3b697a2077..f894a27bb8 100644
--- 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MySqlDataSourceFactory.java
+++ 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/MySqlDataSourceFactory.java
@@ -17,13 +17,14 @@
 package org.apache.nifi.registry.db;
 
 import com.mysql.cj.jdbc.MysqlDataSource;
-import org.testcontainers.containers.MySQLContainer;
+import jakarta.annotation.PostConstruct;
 import org.testcontainers.delegate.DatabaseDelegate;
 import org.testcontainers.jdbc.JdbcDatabaseDelegate;
+import org.testcontainers.mysql.MySQLContainer;
 
-import jakarta.annotation.PostConstruct;
 import javax.script.ScriptException;
 import javax.sql.DataSource;
+
 import java.sql.SQLException;
 
 public abstract class MySqlDataSourceFactory extends TestDataSourceFactory {
diff --git 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres10DataSourceFactory.java
 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres10DataSourceFactory.java
index 04f435e649..ca7484b408 100644
--- 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres10DataSourceFactory.java
+++ 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres10DataSourceFactory.java
@@ -16,21 +16,21 @@
  */
 package org.apache.nifi.registry.db;
 
+import jakarta.annotation.PostConstruct;
 import org.postgresql.ds.PGSimpleDataSource;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Profile;
-import org.testcontainers.containers.PostgreSQLContainer;
 import org.testcontainers.delegate.DatabaseDelegate;
 import org.testcontainers.jdbc.JdbcDatabaseDelegate;
+import org.testcontainers.postgresql.PostgreSQLContainer;
 
-import jakarta.annotation.PostConstruct;
 import javax.sql.DataSource;
 
 @Configuration
 @Profile("postgres-10")
 public class Postgres10DataSourceFactory extends TestDataSourceFactory {
 
-    private static final PostgreSQLContainer<?> POSTGRESQL_CONTAINER = new 
PostgreSQLContainer<>("postgres:10");
+    private static final PostgreSQLContainer POSTGRESQL_CONTAINER = new 
PostgreSQLContainer("postgres:10");
 
     static {
         POSTGRESQL_CONTAINER.start();
diff --git 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres11DataSourceFactory.java
 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres11DataSourceFactory.java
index fe64089049..8c505e0539 100644
--- 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres11DataSourceFactory.java
+++ 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres11DataSourceFactory.java
@@ -15,21 +15,21 @@ package org.apache.nifi.registry.db; /*
  * limitations under the License.
  */
 
+import jakarta.annotation.PostConstruct;
 import org.postgresql.ds.PGSimpleDataSource;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Profile;
-import org.testcontainers.containers.PostgreSQLContainer;
 import org.testcontainers.delegate.DatabaseDelegate;
 import org.testcontainers.jdbc.JdbcDatabaseDelegate;
+import org.testcontainers.postgresql.PostgreSQLContainer;
 
-import jakarta.annotation.PostConstruct;
 import javax.sql.DataSource;
 
 @Configuration
 @Profile("postgres-11")
 public class Postgres11DataSourceFactory extends TestDataSourceFactory {
 
-    private static final PostgreSQLContainer<?> POSTGRESQL_CONTAINER = new 
PostgreSQLContainer<>("postgres:11");
+    private static final PostgreSQLContainer POSTGRESQL_CONTAINER = new 
PostgreSQLContainer("postgres:11");
 
     static {
         POSTGRESQL_CONTAINER.start();
diff --git 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres12DataSourceFactory.java
 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres12DataSourceFactory.java
index 57e5d259b0..58823e4f2a 100644
--- 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres12DataSourceFactory.java
+++ 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres12DataSourceFactory.java
@@ -15,21 +15,21 @@ package org.apache.nifi.registry.db; /*
  * limitations under the License.
  */
 
+import jakarta.annotation.PostConstruct;
 import org.postgresql.ds.PGSimpleDataSource;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Profile;
-import org.testcontainers.containers.PostgreSQLContainer;
 import org.testcontainers.delegate.DatabaseDelegate;
 import org.testcontainers.jdbc.JdbcDatabaseDelegate;
+import org.testcontainers.postgresql.PostgreSQLContainer;
 
-import jakarta.annotation.PostConstruct;
 import javax.sql.DataSource;
 
 @Configuration
 @Profile("postgres-12")
 public class Postgres12DataSourceFactory extends TestDataSourceFactory {
 
-    private static final PostgreSQLContainer<?> POSTGRESQL_CONTAINER = new 
PostgreSQLContainer<>("postgres:12");
+    private static final PostgreSQLContainer POSTGRESQL_CONTAINER = new 
PostgreSQLContainer("postgres:12");
 
     static {
         POSTGRESQL_CONTAINER.start();
diff --git 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres13DataSourceFactory.java
 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres13DataSourceFactory.java
index 493b7c7cda..e9c6bfa585 100644
--- 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres13DataSourceFactory.java
+++ 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres13DataSourceFactory.java
@@ -15,21 +15,21 @@ package org.apache.nifi.registry.db; /*
  * limitations under the License.
  */
 
+import jakarta.annotation.PostConstruct;
 import org.postgresql.ds.PGSimpleDataSource;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Profile;
-import org.testcontainers.containers.PostgreSQLContainer;
 import org.testcontainers.delegate.DatabaseDelegate;
 import org.testcontainers.jdbc.JdbcDatabaseDelegate;
+import org.testcontainers.postgresql.PostgreSQLContainer;
 
-import jakarta.annotation.PostConstruct;
 import javax.sql.DataSource;
 
 @Configuration
 @Profile("postgres-13")
 public class Postgres13DataSourceFactory extends TestDataSourceFactory {
 
-    private static final PostgreSQLContainer<?> POSTGRESQL_CONTAINER = new 
PostgreSQLContainer<>("postgres:13");
+    private static final PostgreSQLContainer POSTGRESQL_CONTAINER = new 
PostgreSQLContainer("postgres:13");
 
     static {
         POSTGRESQL_CONTAINER.start();
diff --git 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres14DataSourceFactory.java
 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres14DataSourceFactory.java
index 3b5932750d..46fb823c65 100644
--- 
a/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres14DataSourceFactory.java
+++ 
b/nifi-registry/nifi-registry-core/nifi-registry-test/src/main/java/org/apache/nifi/registry/db/Postgres14DataSourceFactory.java
@@ -16,21 +16,21 @@
  */
 package org.apache.nifi.registry.db;
 
+import jakarta.annotation.PostConstruct;
 import org.postgresql.ds.PGSimpleDataSource;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Profile;
-import org.testcontainers.containers.PostgreSQLContainer;
 import org.testcontainers.delegate.DatabaseDelegate;
 import org.testcontainers.jdbc.JdbcDatabaseDelegate;
+import org.testcontainers.postgresql.PostgreSQLContainer;
 
-import jakarta.annotation.PostConstruct;
 import javax.sql.DataSource;
 
 @Configuration
 @Profile("postgres-14")
 public class Postgres14DataSourceFactory extends TestDataSourceFactory {
 
-    private static final PostgreSQLContainer<?> POSTGRESQL_CONTAINER = new 
PostgreSQLContainer<>("postgres:14");
+    private static final PostgreSQLContainer POSTGRESQL_CONTAINER = new 
PostgreSQLContainer("postgres:14");
 
     static {
         POSTGRESQL_CONTAINER.start();
diff --git a/nifi-registry/pom.xml b/nifi-registry/pom.xml
index 5272761bb0..104d17fd91 100644
--- a/nifi-registry/pom.xml
+++ b/nifi-registry/pom.xml
@@ -229,7 +229,7 @@
             </dependency>
             <dependency>
                 <groupId>org.testcontainers</groupId>
-                <artifactId>mysql</artifactId>
+                <artifactId>testcontainers-mysql</artifactId>
                 <version>${testcontainers.version}</version>
                 <exclusions>
                     <exclusion>
diff --git a/pom.xml b/pom.xml
index 2235a8c1ac..59fd303737 100644
--- a/pom.xml
+++ b/pom.xml
@@ -204,7 +204,7 @@
         <mockito.version>5.20.0</mockito.version>
         <pmd.version>7.17.0</pmd.version>
         <checkstyle.version>12.0.1</checkstyle.version>
-        <testcontainers.version>1.21.3</testcontainers.version>
+        <testcontainers.version>2.0.0</testcontainers.version>
     </properties>
     <dependencyManagement>
         <dependencies>

Reply via email to