chore(deps): Support Spring boot 4.0.0#2879
chore(deps): Support Spring boot 4.0.0#2879m1ngyuan wants to merge 3 commits intoPlaytikaOSS:developfrom
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughBulk modernization across modules: migrate Testcontainers imports to module-specific packages, update many Testcontainers artifact coordinates in POMs, bump parent BOMs (Spring Boot / Spring Cloud), migrate several client SDKs (DynamoDB v1→v2, Consul client, Elasticsearch/OpenSearch), adjust container bean types and remove shaded commons imports. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~65 minutes Possibly related issues
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 10
Note
Due to the large number of review comments, Critical severity comments were prioritized as inline comments.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
embedded-minio/src/main/java/com/playtika/testcontainer/minio/EmbeddedMinioBootstrapConfiguration.java (1)
101-108:⚠️ Potential issue | 🟠 MajorDo not log MinIO secret key.
Line 102 adds the secret to
map, and Line 108 logs the whole map, leaking credentials to logs.🔒 Proposed fix (redact before logging)
map.put("embedded.minio.secretKey", properties.secretKey); map.put("embedded.minio.region", properties.region); map.put("embedded.minio.networkAlias", MINIO_NETWORK_ALIAS); map.put("embedded.minio.internalPort", properties.getPort()); map.put("embedded.minio.internalConsolePort", properties.getConsolePort()); - log.info("Started Minio server. Connection details: {}", map); + LinkedHashMap<String, Object> safeLogMap = new LinkedHashMap<>(map); + safeLogMap.put("embedded.minio.secretKey", "******"); + log.info("Started Minio server. Connection details: {}", safeLogMap);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-minio/src/main/java/com/playtika/testcontainer/minio/EmbeddedMinioBootstrapConfiguration.java` around lines 101 - 108, The code currently puts properties.secretKey into the map and then logs the entire map in EmbeddedMinioBootstrapConfiguration (map, properties.accessKey, properties.secretKey, MINIO_NETWORK_ALIAS), which leaks credentials; remove the secret from the map before logging (or replace properties.secretKey with a fixed redacted value like "<REDACTED>") so that log.info("Started Minio server. Connection details: {}", map) never contains the secret key, while keeping other fields (accessKey, region, ports, network alias) intact.
🟠 Major comments (13)
embedded-rabbitmq/src/main/java/com/playtika/testcontainer/rabbitmq/EmbeddedRabbitMQBootstrapConfiguration.java-79-84 (1)
79-84:⚠️ Potential issue | 🟠 MajorCheck exit code when enabling RabbitMQ plugins.
At line 83,
execInContainer(...)ignores its return value. In Testcontainers Java,execInContainerdoes not throw on non-zero exit codes—it returns anExecResultthat must be explicitly checked. If plugin activation fails, the container will start with disabled plugins and tests may fail unexpectedly.Suggested fix
+import org.testcontainers.containers.Container; ... if (properties.getEnabledPlugins() != null && !properties.getEnabledPlugins().isEmpty()) { List<String> command = new ArrayList<>(properties.getEnabledPlugins().size() + 2); command.addAll(Arrays.asList("rabbitmq-plugins", "enable")); command.addAll(properties.getEnabledPlugins()); - rabbitMQ.execInContainer(command.toArray(new String[0])); + Container.ExecResult execResult = rabbitMQ.execInContainer(command.toArray(new String[0])); + if (execResult.getExitCode() != 0) { + throw new IllegalStateException( + "RabbitMQ plugin enable failed: " + execResult.getStderr() + ); + } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-rabbitmq/src/main/java/com/playtika/testcontainer/rabbitmq/EmbeddedRabbitMQBootstrapConfiguration.java` around lines 79 - 84, The execInContainer call in EmbeddedRabbitMQBootstrapConfiguration currently ignores the ExecResult from rabbitMQ.execInContainer(command...), so plugin enablement failures are silent; update the code to capture the ExecResult, check its getExitCode() (or isSuccessful equivalent), and if non-zero throw or log a descriptive exception containing the exit code, stdout and stderr so test failure is explicit (include the original command and properties.getEnabledPlugins() in the message); ensure this check is applied to the rabbitMQ.execInContainer(...) call that enables plugins.embedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationTest.java-31-33 (1)
31-33:⚠️ Potential issue | 🟠 MajorAsync assertion is not awaited; test can pass incorrectly.
The callback registered on line 31 executes asynchronously, but the test method exits immediately without waiting for it. If the async operation fails or the callback is delayed, the assertion may never execute or execute after the test completes, causing false positives.
Also assert success/failure explicitly rather than only checking the result value.
Proposed fix
+import java.util.concurrent.CountDownLatch; +import java.util.concurrent.atomic.AtomicReference; + `@Test` - public void shouldUpdateKey() { + public void shouldUpdateKey() throws Exception { ConsulClient client = buildClient(); - client.putValue("key", "val").onComplete(res ->{ - assertThat(res.result()).isEqualTo(true); - }); + CountDownLatch latch = new CountDownLatch(1); + AtomicReference<Boolean> updated = new AtomicReference<>(); + AtomicReference<Throwable> error = new AtomicReference<>(); + + client.putValue("key", "val").onComplete(res -> { + if (res.succeeded()) { + updated.set(res.result()); + } else { + error.set(res.cause()); + } + latch.countDown(); + }); + + assertThat(latch.await(5, java.util.concurrent.TimeUnit.SECONDS)).isTrue(); + assertThat(error.get()).isNull(); + assertThat(updated.get()).isTrue(); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationTest.java` around lines 31 - 33, The async callback on client.putValue("key", "val").onComplete(...) is not waited for, so change the test to synchronously wait for the operation and assert both success and value: obtain the Future/AsyncResult from client.putValue (or convert it to a CompletionStage/CompletableFuture), block with a timeout to wait for completion, then assert res.succeeded() (or that the future completed normally) and assertThat(res.result()).isEqualTo(true); ensure the test method does not exit before the async operation completes by using the returned future/CompletionStage (from client.putValue) or a test synchronisation helper instead of relying solely on the onComplete callback.embedded-mariadb/pom.xml-35-38 (1)
35-38:⚠️ Potential issue | 🟠 MajorSuboptimal artifact choice: use
spring-boot-starter-jdbcinstead ofspring-boot-jdbc.The
spring-boot-jdbcartifact is a core Spring Boot module containing JDBC utilities (DataSourceBuilder, DatabaseDriver, etc.), but it is not designed for direct use in application dependencies. The standard approach is to usespring-boot-starter-jdbc, which provides the full JDBC setup including spring-jdbc, HikariCP, and auto-configuration.Suggested fix
<dependency> <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-jdbc</artifactId> + <artifactId>spring-boot-starter-jdbc</artifactId> <scope>test</scope> </dependency>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-mariadb/pom.xml` around lines 35 - 38, The pom currently depends on the wrong artifactId "spring-boot-jdbc"; replace that dependency with the starter artifact "spring-boot-starter-jdbc" (keep the same groupId org.springframework.boot and scope test) so the project pulls in spring-jdbc, HikariCP and proper auto-configuration; update the dependency block referencing artifactId spring-boot-jdbc to use spring-boot-starter-jdbc instead.embedded-influxdb/pom.xml-39-43 (1)
39-43:⚠️ Potential issue | 🟠 MajorAdd version specification for Jackson 3.x dependency or ensure parent BOM manages
tools.jackson.coreversions.The
tools.jackson.core:jackson-databinddependency is correctly using the Jackson 3.x groupId, which is legitimate and expected for Spring Boot 4.0. However, the dependency lacks an explicit version specification, and the parent BOM (which imports Spring Boot 4.0.5) primarily manages Jackson 2.x versions (2.21.2), not Jackson 3.x. This creates a version management gap.Either:
- Add explicit version to the dependency (e.g.,
<version>3.1.1</version>)- Add Jackson 3.x version management to the parent BOM
- Verify the parent BOM or a configured repository provides automatic version resolution for
tools.jackson.coreartifactsEnsure any Jackson 3.x usage is compatible with Java 17+ requirement.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-influxdb/pom.xml` around lines 39 - 43, The pom declares the test dependency tools.jackson.core:jackson-databind with no version, but the parent BOM manages Jackson 2.x only, so add explicit Jackson 3.x versioning or manage it in the BOM: update the dependency for artifactId jackson-databind to include a concrete <version> (e.g., 3.1.1) or add Jackson 3.x entries to the parent BOM / dependencyManagement so tools.jackson.core artifacts are resolved to a 3.x release; ensure the chosen Jackson 3.x version is compatible with Java 17 and adjust any test scope usages accordingly.embedded-rabbitmq/pom.xml-26-33 (1)
26-33:⚠️ Potential issue | 🟠 MajorConfirm the intentionality of making
spring-boot-amqpa required dependency.Two artifact changes here:
- Testcontainers artifact renamed from
rabbitmqtotestcontainers-rabbitmq✓- Spring dependency changed from
org.springframework.amqp:spring-rabbit(optional) toorg.springframework.boot:spring-boot-amqp(required)The
spring-boot-amqpartifact is valid in Spring Boot 4.0, but this change makes AMQP a required transitive dependency. Sinceembedded-rabbitmqis a library module, consumers who don't use AMQP will now have it pulled in automatically. Verify this is intentional—consider marking as<optional>true</optional>unless the module is strictly for AMQP-based testing.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-rabbitmq/pom.xml` around lines 26 - 33, The POM change makes org.springframework.boot:spring-boot-amqp a non-optional transitive dependency (artifactId spring-boot-amqp) which will force AMQP onto all consumers of the embedded-rabbitmq library; if that was not intended, revert to the previous optional dependency (org.springframework.amqp:spring-rabbit with <optional>true</optional>) or mark the new spring-boot-amqp dependency as optional/test scope so AMQP is not pulled transitively — update the dependency block for spring-boot-amqp accordingly or restore the former dependency to ensure the module remains non-invasive to consumers who don't use AMQP.embedded-elasticsearch/pom.xml-30-31 (1)
30-31:⚠️ Potential issue | 🟠 MajorUse
spring-boot-starter-data-elasticsearchinstead ofspring-boot-data-elasticsearch.The Spring Boot 4 migration guide recommends
spring-boot-starter-data-elasticsearch(the starter) as the standard dependency for Elasticsearch support, not the corespring-boot-data-elasticsearchmodule. The starter version includes auto-configuration and is the primary artifact for Spring Boot 4.0+.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-elasticsearch/pom.xml` around lines 30 - 31, Replace the dependency artifactId "spring-boot-data-elasticsearch" with the Spring Boot starter "spring-boot-starter-data-elasticsearch" so the dependency block using groupId "org.springframework.boot" references the starter artifact; also remove any explicit version if Spring Boot BOM manages it to rely on auto-configuration provided by the starter.embedded-elasticsearch/src/main/java/com/playtika/testcontainer/elasticsearch/EmbeddedElasticSearchRestClientDependenciesAutoConfiguration.java-15-18 (1)
15-18:⚠️ Potential issue | 🟠 MajorUpdate
@AutoConfigurationto use the Spring Boot 4 package pathLine 15 references the pre-Boot-4 class name. This breaks auto-configuration ordering in Boot 4 environments where the correct package is
org.springframework.boot.elasticsearch.autoconfigure(notorg.springframework.boot.autoconfigure.elasticsearch).Fix
-@AutoConfiguration(afterName = "org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration") +@AutoConfiguration(afterName = "org.springframework.boot.elasticsearch.autoconfigure.ElasticsearchRestClientAutoConfiguration")🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-elasticsearch/src/main/java/com/playtika/testcontainer/elasticsearch/EmbeddedElasticSearchRestClientDependenciesAutoConfiguration.java` around lines 15 - 18, The `@AutoConfiguration` afterName value is using the pre-Boot-4 package; update the annotation on EmbeddedElasticSearchRestClientDependenciesAutoConfiguration so the afterName refers to the Boot 4 auto-configuration class path "org.springframework.boot.elasticsearch.autoconfigure.ElasticsearchRestClientAutoConfiguration" instead of "org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration" to restore correct auto-configuration ordering.embedded-neo4j/src/main/java/com/playtika/testcontainer/neo4j/EmbeddedNeo4jDependenciesAutoConfiguration.java-20-20 (1)
20-20:⚠️ Potential issue | 🟠 MajorUpdate
afterNamereference to Spring Boot 4.x Data Neo4j auto-config class.Line 20 references
org.springframework.boot.neo4j.autoconfigure.Neo4jDataAutoConfiguration, which does not exist in Spring Boot 4.x. The correct class isorg.springframework.boot.data.neo4j.autoconfigure.DataNeo4jAutoConfiguration. Using the incorrect name silently disables auto-configuration ordering.Fix
-@AutoConfiguration(afterName = "org.springframework.boot.neo4j.autoconfigure.Neo4jDataAutoConfiguration") +@AutoConfiguration(afterName = "org.springframework.boot.data.neo4j.autoconfigure.DataNeo4jAutoConfiguration")🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-neo4j/src/main/java/com/playtika/testcontainer/neo4j/EmbeddedNeo4jDependenciesAutoConfiguration.java` at line 20, The `@AutoConfiguration` annotation on EmbeddedNeo4jDependenciesAutoConfiguration uses the wrong afterName; change the string "org.springframework.boot.neo4j.autoconfigure.Neo4jDataAutoConfiguration" to the Spring Boot 4.x class name "org.springframework.boot.data.neo4j.autoconfigure.DataNeo4jAutoConfiguration" so the auto-configuration ordering for EmbeddedNeo4jDependenciesAutoConfiguration is applied correctly.embedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationBaseTest.java-17-21 (1)
17-21:⚠️ Potential issue | 🟠 MajorClose the
Vertxinstance andConsulClientyou allocate here.
buildClient()creates a fresh event-loop instance and ConsulClient on every call and never closes either. Per Vert.x best practices,ConsulClient.create(vertx, options)does not take ownership of the externally-provided Vertx instance—both the client and the Vertx instance must be explicitly closed. This leaks threads and connections across tests, causing resource exhaustion and potential test flakiness. Keep a sharedVertxper test class and close both client and Vertx in a teardown hook, or refactor to hand off lifecycle ownership to callers.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationBaseTest.java` around lines 17 - 21, buildClient() creates a new Vertx (Vertx.builder().build()) and ConsulClient (ConsulClient.create(vertx, options)) on every call but never closes them, leaking threads and connections; fix by making a shared Vertx instance for the test class (e.g., a private static or `@BeforeClass` field) and update buildClient() to only create and return a ConsulClient tied to that shared Vertx, and add a teardown hook (e.g., `@AfterClass` or `@After`) that closes any created ConsulClient instances and the shared Vertx via ConsulClient.close(...) and Vertx.close(...) (or blocking/waiting variant) to ensure both the client and Vertx are explicitly shut down.embedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationConfigTest.java-37-40 (1)
37-40:⚠️ Potential issue | 🟠 MajorWait for the async result and assert the actual forbidden outcome.
This test returns as soon as the handler is registered—JUnit has no way to wait for the callback to execute. Use
VertxTestContextwithcompleteNow()orawaitCompletion()to properly handle the async operation. Additionally, the assertion only checks the broadVertxExceptiontype instead of verifying the specific forbidden (403) response the test claims to expect. Assert on the actual HTTP status code or specific exception details.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationConfigTest.java` around lines 37 - 40, The async handler registered on client.putValue("key", "val") returns immediately and the test exits before the callback runs; update the test in EmbeddedConsulBootstrapConfigurationConfigTest to use VertxTestContext (e.g., pass a VertxTestContext into the test) and call context.completeNow() or awaitCompletion() inside the onComplete callback so JUnit waits for the async result, and replace the broad assertThat(res.cause()).isInstanceOf(VertxException.class) with an assertion that inspects the actual forbidden outcome (check the response status code or specific exception message/code from the client result inside the onComplete handler to assert 403). Ensure these changes are made around the client.putValue(...) onComplete callback to properly wait and verify the forbidden status.embedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/EmbeddedDynamoDBBootstrapConfigurationTest.java-80-102 (1)
80-102:⚠️ Potential issue | 🟠 MajorWait for the table to become
ACTIVEand handle duplicate table creation.
CreateTableis asynchronous and returnsCREATINGstatus immediately. DynamoDB only allows reads/writes when the table isACTIVE. The current code can proceed tosave/queryoperations while the table is still being provisioned, and running the test or configuration multiple times will fail withResourceInUseException. Use the SDK waiter after table creation and catch the exception to handle the idempotent case.Suggested change
void setupTable() { ProvisionedThroughput throughput = ProvisionedThroughput.builder().readCapacityUnits(5L).writeCapacityUnits(5L).build(); final KeySchemaElement[] keySchemes = {KeySchemaElement.builder().keyType(KeyType.HASH).attributeName("id").build(), KeySchemaElement.builder().keyType(KeyType.RANGE).attributeName("firstName").build()}; AttributeDefinition[] attributeDefinitions = {AttributeDefinition.builder().attributeName("id").attributeType(ScalarAttributeType.S).build(), AttributeDefinition.builder().attributeName("firstName").attributeType(ScalarAttributeType.S).build()}; CreateTableRequest ctr = CreateTableRequest.builder().tableName("user") .keySchema(keySchemes) .attributeDefinitions(attributeDefinitions) .provisionedThroughput(throughput).build(); - CreateTableResponse response = dynamoDbClient.createTable(ctr); - TableDescription tableDescription = response.tableDescription(); - TableStatus tableStatus = tableDescription.tableStatus(); - if (tableStatus == TableStatus.CREATING) { - log.info("Creating table {}", tableDescription.tableName()); - }else if (tableStatus == TableStatus.ACTIVE) { - log.info("Table {} is active", tableDescription.tableName()); - } + try { + CreateTableResponse response = dynamoDbClient.createTable(ctr); + TableDescription tableDescription = response.tableDescription(); + TableStatus tableStatus = tableDescription.tableStatus(); + if (tableStatus == TableStatus.CREATING) { + log.info("Creating table {}", tableDescription.tableName()); + } else if (tableStatus == TableStatus.ACTIVE) { + log.info("Table {} is active", tableDescription.tableName()); + } + } catch (ResourceInUseException ignored) { + log.info("Table {} already exists", ctr.tableName()); + } + + dynamoDbClient.waiter().waitUntilTableExists(r -> r.tableName(ctr.tableName())); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/EmbeddedDynamoDBBootstrapConfigurationTest.java` around lines 80 - 102, The setupTable() helper must wait for the table to reach ACTIVE and gracefully handle duplicate creation: after calling dynamoDbClient.createTable(ctr) use the SDK waiter (e.g., dynamoDbClient.waiter().waitUntilTableExists or equivalent waitUntilTableActive) targeting ctr.tableName() (or response.tableDescription().tableName()) to block until the table is ACTIVE, and wrap the createTable+wait in a try/catch that catches ResourceInUseException (or the SDK equivalent) and treats it as idempotent (log and continue) so repeated runs don’t fail.embedded-mongodb/src/main/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapConfiguration.java-76-82 (1)
76-82:⚠️ Potential issue | 🟠 Major
withExposedPorts()replaces the default port — breaking non-default port configurations.
MongoDBContainerexposes 27017 by default in its constructor. Calling.withExposedPorts(properties.getPort())on lines 80 and 98 replaces that exposure instead of appending, but the MongoDB daemon inside the container still only listens on 27017. Whenproperties.getPort()differs from 27017, the subsequentgetMappedPort(properties.getPort())call on line 109 fails because the container never listens on that custom port. The container's hardcoded internal port (27017) must match the port used ingetMappedPort()lookups.Remove the
.withExposedPorts(properties.getPort())calls and use the fixed 27017 port ingetMappedPort()lookups, or reconfigure the MongoDB daemon to listen on the custom port if supporting non-default ports is part of the public API.Suggested fix
- .withExposedPorts(properties.getPort()) .waitingFor(new MongodbWaitStrategy(properties))private static final int MONGODB_INTERNAL_PORT = 27017; // Then use MONGODB_INTERNAL_PORT in getMappedPort() calls instead of properties.getPort() Integer mappedPort = mongodb.getMappedPort(MONGODB_INTERNAL_PORT);Also applies to: 84-100
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-mongodb/src/main/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapConfiguration.java` around lines 76 - 82, The container exposes 27017 internally, but the code calls MongoDBContainer.withExposedPorts(properties.getPort()) and later mongodb.getMappedPort(properties.getPort()), causing lookup failures when properties.getPort() != 27017; remove the withExposedPorts(properties.getPort()) calls and instead keep the container's default exposure, introduce or use a constant for the internal port (e.g. MONGODB_INTERNAL_PORT = 27017) and replace any mongodb.getMappedPort(properties.getPort()) calls with mongodb.getMappedPort(MONGODB_INTERNAL_PORT) (update usages in EmbeddedMongodbBootstrapConfiguration around the mongodb variable and any interactions with properties.getPort()); if you intend to support non-default internal ports, reconfigure the MongoDB daemon startup instead of changing withExposedPorts.embedded-influxdb/src/main/java/com/playtika/testcontainer/influxdb/EmbeddedInfluxDBBootstrapConfiguration.java-73-75 (1)
73-75:⚠️ Potential issue | 🟠 MajorRemove the first
withExposedPorts(properties.getPort())call—it's immediately overwritten by the second call.The
GenericContainer.withExposedPorts()method replaces the exposed-port list (callssetExposedPorts()→clear()before setting). Line 75 wins, leaving only INFLUXDB_PORT (8086) exposed. However, line 89 then callsgetMappedPort(properties.getPort())with no mapping for non-default ports, and line 53 passesproperties.getPort()to ToxiproxyHelper, both of which will fail at runtime if a custom port is configured.Either enforce INFLUXDB_PORT everywhere (remove line 73, update lines 89, 53, and 99 to use
INFLUXDB_PORTinstead ofproperties.getPort()), or validate and reject custom port values at configuration time.Minimal fix
- .withExposedPorts(properties.getPort()) .withNetworkAliases(INFLUXDB_NETWORK_ALIAS) - .withExposedPorts(INFLUXDB_PORT); + .withExposedPorts(INFLUXDB_PORT);Then align downstream lookups:
// Line 53: change properties.getPort() to INFLUXDB_PORT ToxiproxyHelper.createProxy(toxiproxyClient, toxiproxyContainer, influxdb, INFLUXDB_PORT, "influxdb"); // Line 89: change properties.getPort() to INFLUXDB_PORT Integer mappedPort = influx.getMappedPort(INFLUXDB_PORT); // Line 99: change properties.getPort() to INFLUXDB_PORT map.put("embedded.influxdb.internalPort", INFLUXDB_PORT);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-influxdb/src/main/java/com/playtika/testcontainer/influxdb/EmbeddedInfluxDBBootstrapConfiguration.java` around lines 73 - 75, Remove the redundant withExposedPorts(properties.getPort()) call (it gets overwritten by withExposedPorts(INFLUXDB_PORT)) and align downstream uses to the constant INFLUXDB_PORT: update calls that reference properties.getPort() (e.g., ToxiproxyHelper.createProxy(toxiproxyClient, toxiproxyContainer, influxdb, properties.getPort(), ...), influx.getMappedPort(properties.getPort()), and the map.put("embedded.influxdb.internalPort", properties.getPort())) to use INFLUXDB_PORT instead so the exposed/mapped port is consistent at runtime.
🟡 Minor comments (4)
embedded-clickhouse/README.adoc-47-47 (1)
47-47:⚠️ Potential issue | 🟡 MinorAdd explicit protocol to the JDBC URL on Line 48.
The JDBC URL is missing the required protocol specification. Update from
jdbc:clickhouse://${embedded.clickhouse.host}:...tojdbc:clickhouse:http://${embedded.clickhouse.host}:...(orhttpsif applicable). Thecom.clickhouse.jdbc.Driverrequires an explicithttporhttpsprotocol in the URL; it does not infer the protocol from the port number.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-clickhouse/README.adoc` at line 47, The JDBC URL in the README is missing an explicit HTTP(S) protocol required by the ClickHouse driver; update the example JDBC URL that currently starts with "jdbc:clickhouse://${embedded.clickhouse.host}:..." to include the protocol like "jdbc:clickhouse:http://${embedded.clickhouse.host}:..." (or "jdbc:clickhouse:https://..." if using TLS) so it matches the com.clickhouse.jdbc.Driver requirement.embedded-pulsar/pom.xml-63-67 (1)
63-67:⚠️ Potential issue | 🟡 MinorAdd
spring-boot-restclientdependency alongside the test client.The artifact name
spring-boot-resttestclientis correct for Spring Boot 4.0. However, Spring Boot documentation indicates thatspring-boot-restclientmust also be included. Add the following dependency:<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-restclient</artifactId> </dependency>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-pulsar/pom.xml` around lines 63 - 67, Add the missing Spring Boot REST client dependency by declaring a dependency with groupId org.springframework.boot and artifactId spring-boot-restclient (no test scope) alongside the existing spring-boot-resttestclient dependency; update the Maven dependencies block so both artifactIds (spring-boot-resttestclient and spring-boot-restclient) are present to satisfy Spring Boot 4.0 requirements.embedded-neo4j/src/main/java/com/playtika/testcontainer/neo4j/EmbeddedNeo4jBootstrapConfiguration.java-62-62 (1)
62-62:⚠️ Potential issue | 🟡 MinorAdd generic type parameter to
Neo4jContainerdeclarations.The generic type parameter is still fully supported in Testcontainers Neo4j module. Use
Neo4jContainer<?>following the official Testcontainers pattern to suppress unchecked warnings. This applies to multiple declarations in the file: the method parameter (line 43), method return type (line 59), variable declaration (line 62), cast (line 67), and method parameter (line 72).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-neo4j/src/main/java/com/playtika/testcontainer/neo4j/EmbeddedNeo4jBootstrapConfiguration.java` at line 62, Update all Neo4jContainer declarations to include the wildcard generic to suppress unchecked warnings: change the method parameter type, the method return type, the local variable declaration (neo4j), the cast, and the other method parameter in EmbeddedNeo4jBootstrapConfiguration so they use Neo4jContainer<?> instead of raw Neo4jContainer; ensure every occurrence (variable neo4j, the cast site, and both method signatures) is updated consistently.embedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/EmbeddedDynamoDBBootstrapConfigurationTest.java-56-62 (1)
56-62:⚠️ Potential issue | 🟡 MinorThis assertion no longer matches what the test claims to verify.
shouldSetupDependsOnForAllDataAmazonDBsnow only checks that adynamoDbClientbean exists. That will still pass if the embedded-startup dependency ordering disappears entirely, so either restore an assertion on the bean definition’sdependsOnmetadata or rename the test to match the narrower contract.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/EmbeddedDynamoDBBootstrapConfigurationTest.java` around lines 56 - 62, The test should assert the bean definition's dependsOn metadata rather than only existence: in the test method shouldSetupDependsOnForAllDataAmazonDBs, after locating the bean name via BeanFactoryUtils.beanNamesForTypeIncludingAncestors(beanFactory, DynamoDbClient.class) and confirming "dynamoDbClient" exists, retrieve the BeanDefinition from the beanFactory (using beanFactory.getBeanDefinition("dynamoDbClient") or equivalent) and assert its dependsOn contains the embedded startup bean(s) (the expected dependency name(s)); alternatively, if the test intent changed, rename shouldSetupDependsOnForAllDataAmazonDBs to reflect the narrower contract and update assertions accordingly.
🧹 Nitpick comments (3)
embedded-git/pom.xml (1)
8-8: Project-wide snapshot version is intentional for development; release workflow handles conversion automatically.The 4.0.0-SNAPSHOT version applied consistently across all modules (52+ pom.xml files) is part of the active migration to Spring Boot 4. The existing release workflow automatically strips the
-SNAPSHOTsuffix during the release process viaversions:set, so no additional changes are needed before cutting releases.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-git/pom.xml` at line 8, The POMs currently use a project-wide <version>4.0.0-SNAPSHOT</version> intentionally for development; no code change is required — keep the <version> element as is in pom.xml and ensure the release workflow (the step that runs versions:set) remains configured to strip the -SNAPSHOT suffix at release time so released artifacts use 4.0.0; verify the release job that invokes versions:set is present and tested in CI/CD to avoid committing a snapshot as a release.embedded-neo4j/pom.xml (1)
16-17: Consider removing the empty<properties>block.The
<properties>block is now empty after removing theneo4j-java-driver.versionproperty. Consider removing this unused block for cleaner POM structure.🧹 Proposed cleanup
- <properties> - </properties> - <dependencies>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-neo4j/pom.xml` around lines 16 - 17, Remove the now-empty <properties> block from the POM to clean up the project descriptor: locate the <properties> element in the pom.xml (the block shown in the diff) and delete the entire <properties>...</properties> section since it contains no properties like neo4j-java-driver.version anymore.embedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/springdata/User.java (1)
23-29: Keep the enhanced-client key annotations aligned with the table schema.
setupTable()createsuserwithidas the partition key andfirstNameas the RANGE/sort key, but this bean only marksidas a key. AWS’s enhanced-client docs call out that existing-table mappings need the necessary key annotations, andquery()derives key semantics from@DynamoDbPartitionKeyand optional@DynamoDbSortKey. If the test table stays composite-key,firstNameshould be annotated as the sort key; otherwise drop the RANGE key from the table definition. (docs.aws.amazon.com)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/springdata/User.java` around lines 23 - 29, The User mapping currently only marks getId() with `@DynamoDbPartitionKey` while setupTable() creates a composite key with id as the partition key and firstName as the sort key; update the User bean so the getter for firstName (getFirstName()) is annotated with `@DynamoDbSortKey` (or alternatively change setupTable() to remove the RANGE/sort key if you intend a single-key table) to keep key annotations aligned with the table schema and ensure enhanced-client queries derive correct key semantics.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@embedded-db2/pom.xml`:
- Around line 30-33: The dependency artifactId is incorrect: update the Maven
dependency block in pom.xml for org.testcontainers to use artifactId "db2"
instead of "testcontainers-db2" so Maven can resolve the Testcontainers DB2
module; locate the <dependency> element referencing groupId "org.testcontainers"
and change its artifactId to "db2" (ensure version remains compatible, e.g.,
1.21.3+).
In `@embedded-elasticsearch/pom.xml`:
- Line 27: The pom.xml currently references a non-existent Testcontainers
artifactId "testcontainers-elasticsearch"; change the <artifactId> value under
the org.testcontainers dependency to "elasticsearch" so the dependency reads
groupId org.testcontainers and artifactId elasticsearch (update the dependency
entry that contains the artifactId tag to use "elasticsearch").
In `@embedded-git/src/test/java/EmbeddedGitBootstrapConfigurationTest.java`:
- Line 27: The test class EmbeddedGitBootstrapConfigurationTest imports
org.apache.commons.io.FileUtils.contentEquals but commons-io is missing from the
module dependencies; add a test-scoped dependency for commons-io to the
embedded-git module's pom (groupId commons-io, artifactId commons-io, scope
test) so the import compiles and tests can run.
In `@embedded-localstack/pom.xml`:
- Line 43: Replace the incorrect artifactId value "testcontainers-localstack"
with the canonical Maven artifactId "localstack" in the dependency declaration
(update the <artifactId> element), and ensure the dependency version matches the
Testcontainers core version (e.g., 1.21.4) so the localstack artifact resolves
correctly.
In `@embedded-mariadb/pom.xml`:
- Around line 31-34: Update the dependency declaration for Testcontainers
MariaDB by changing the artifactId element value from "testcontainers-mariadb"
to "mariadb" under the existing <dependency> with groupId "org.testcontainers"
so Maven resolves the correct org.testcontainers:mariadb artifact.
In `@embedded-minio/pom.xml`:
- Around line 31-34: The dependency's artifactId is incorrect: update the
dependency block that currently has
<artifactId>testcontainers-minio</artifactId> to use
<artifactId>minio</artifactId> so Maven can resolve org.testcontainers:minio;
also ensure the dependency uses a supported Testcontainers version (e.g., 1.21.3
or newer) if not already specified.
In `@embedded-mockserver/pom.xml`:
- Around line 30-33: The dependency artifactId is incorrect: change the
<artifactId> value from testcontainers-mockserver to mockserver in the
org.testcontainers dependency block (update the <artifactId> element inside the
dependency that currently references org.testcontainers) so Maven can resolve
the correct MockServer artifact.
In `@embedded-mongodb/pom.xml`:
- Around line 28-33: Replace the incorrect Maven artifactIds: change the
org.testcontainers dependency artifactId from "testcontainers-mongodb" to
"mongodb" and change the org.springframework.boot dependency artifactId from
"spring-boot-data-mongodb" to "spring-boot-starter-data-mongodb" so the
dependencies referenced by artifactId "mongodb" (org.testcontainers) and
"spring-boot-starter-data-mongodb" (org.springframework.boot) are used; update
the two <dependency> entries accordingly to fix the build failures.
In `@embedded-pulsar/pom.xml`:
- Around line 30-33: Replace the incorrect Testcontainers Pulsar artifactId
'testcontainers-pulsar' with the official artifactId 'pulsar' in the dependency
block (the <dependency> containing groupId 'org.testcontainers' and artifactId
'testcontainers-pulsar'); update the artifactId value to 'pulsar' so the
dependency becomes groupId 'org.testcontainers' and artifactId 'pulsar'.
In `@embedded-redis/pom.xml`:
- Around line 30-34: The dependency uses the non-existent artifactId
"spring-boot-data-redis"; update the dependency block so the artifactId value is
"spring-boot-starter-data-redis" (i.e., replace "spring-boot-data-redis" with
"spring-boot-starter-data-redis") so Maven can resolve the Spring Boot Redis
starter.
---
Outside diff comments:
In
`@embedded-minio/src/main/java/com/playtika/testcontainer/minio/EmbeddedMinioBootstrapConfiguration.java`:
- Around line 101-108: The code currently puts properties.secretKey into the map
and then logs the entire map in EmbeddedMinioBootstrapConfiguration (map,
properties.accessKey, properties.secretKey, MINIO_NETWORK_ALIAS), which leaks
credentials; remove the secret from the map before logging (or replace
properties.secretKey with a fixed redacted value like "<REDACTED>") so that
log.info("Started Minio server. Connection details: {}", map) never contains the
secret key, while keeping other fields (accessKey, region, ports, network alias)
intact.
---
Major comments:
In
`@embedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationBaseTest.java`:
- Around line 17-21: buildClient() creates a new Vertx (Vertx.builder().build())
and ConsulClient (ConsulClient.create(vertx, options)) on every call but never
closes them, leaking threads and connections; fix by making a shared Vertx
instance for the test class (e.g., a private static or `@BeforeClass` field) and
update buildClient() to only create and return a ConsulClient tied to that
shared Vertx, and add a teardown hook (e.g., `@AfterClass` or `@After`) that closes
any created ConsulClient instances and the shared Vertx via
ConsulClient.close(...) and Vertx.close(...) (or blocking/waiting variant) to
ensure both the client and Vertx are explicitly shut down.
In
`@embedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationConfigTest.java`:
- Around line 37-40: The async handler registered on client.putValue("key",
"val") returns immediately and the test exits before the callback runs; update
the test in EmbeddedConsulBootstrapConfigurationConfigTest to use
VertxTestContext (e.g., pass a VertxTestContext into the test) and call
context.completeNow() or awaitCompletion() inside the onComplete callback so
JUnit waits for the async result, and replace the broad
assertThat(res.cause()).isInstanceOf(VertxException.class) with an assertion
that inspects the actual forbidden outcome (check the response status code or
specific exception message/code from the client result inside the onComplete
handler to assert 403). Ensure these changes are made around the
client.putValue(...) onComplete callback to properly wait and verify the
forbidden status.
In
`@embedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationTest.java`:
- Around line 31-33: The async callback on client.putValue("key",
"val").onComplete(...) is not waited for, so change the test to synchronously
wait for the operation and assert both success and value: obtain the
Future/AsyncResult from client.putValue (or convert it to a
CompletionStage/CompletableFuture), block with a timeout to wait for completion,
then assert res.succeeded() (or that the future completed normally) and
assertThat(res.result()).isEqualTo(true); ensure the test method does not exit
before the async operation completes by using the returned
future/CompletionStage (from client.putValue) or a test synchronisation helper
instead of relying solely on the onComplete callback.
In
`@embedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/EmbeddedDynamoDBBootstrapConfigurationTest.java`:
- Around line 80-102: The setupTable() helper must wait for the table to reach
ACTIVE and gracefully handle duplicate creation: after calling
dynamoDbClient.createTable(ctr) use the SDK waiter (e.g.,
dynamoDbClient.waiter().waitUntilTableExists or equivalent waitUntilTableActive)
targeting ctr.tableName() (or response.tableDescription().tableName()) to block
until the table is ACTIVE, and wrap the createTable+wait in a try/catch that
catches ResourceInUseException (or the SDK equivalent) and treats it as
idempotent (log and continue) so repeated runs don’t fail.
In `@embedded-elasticsearch/pom.xml`:
- Around line 30-31: Replace the dependency artifactId
"spring-boot-data-elasticsearch" with the Spring Boot starter
"spring-boot-starter-data-elasticsearch" so the dependency block using groupId
"org.springframework.boot" references the starter artifact; also remove any
explicit version if Spring Boot BOM manages it to rely on auto-configuration
provided by the starter.
In
`@embedded-elasticsearch/src/main/java/com/playtika/testcontainer/elasticsearch/EmbeddedElasticSearchRestClientDependenciesAutoConfiguration.java`:
- Around line 15-18: The `@AutoConfiguration` afterName value is using the
pre-Boot-4 package; update the annotation on
EmbeddedElasticSearchRestClientDependenciesAutoConfiguration so the afterName
refers to the Boot 4 auto-configuration class path
"org.springframework.boot.elasticsearch.autoconfigure.ElasticsearchRestClientAutoConfiguration"
instead of
"org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration"
to restore correct auto-configuration ordering.
In `@embedded-influxdb/pom.xml`:
- Around line 39-43: The pom declares the test dependency
tools.jackson.core:jackson-databind with no version, but the parent BOM manages
Jackson 2.x only, so add explicit Jackson 3.x versioning or manage it in the
BOM: update the dependency for artifactId jackson-databind to include a concrete
<version> (e.g., 3.1.1) or add Jackson 3.x entries to the parent BOM /
dependencyManagement so tools.jackson.core artifacts are resolved to a 3.x
release; ensure the chosen Jackson 3.x version is compatible with Java 17 and
adjust any test scope usages accordingly.
In
`@embedded-influxdb/src/main/java/com/playtika/testcontainer/influxdb/EmbeddedInfluxDBBootstrapConfiguration.java`:
- Around line 73-75: Remove the redundant withExposedPorts(properties.getPort())
call (it gets overwritten by withExposedPorts(INFLUXDB_PORT)) and align
downstream uses to the constant INFLUXDB_PORT: update calls that reference
properties.getPort() (e.g., ToxiproxyHelper.createProxy(toxiproxyClient,
toxiproxyContainer, influxdb, properties.getPort(), ...),
influx.getMappedPort(properties.getPort()), and the
map.put("embedded.influxdb.internalPort", properties.getPort())) to use
INFLUXDB_PORT instead so the exposed/mapped port is consistent at runtime.
In `@embedded-mariadb/pom.xml`:
- Around line 35-38: The pom currently depends on the wrong artifactId
"spring-boot-jdbc"; replace that dependency with the starter artifact
"spring-boot-starter-jdbc" (keep the same groupId org.springframework.boot and
scope test) so the project pulls in spring-jdbc, HikariCP and proper
auto-configuration; update the dependency block referencing artifactId
spring-boot-jdbc to use spring-boot-starter-jdbc instead.
In
`@embedded-mongodb/src/main/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapConfiguration.java`:
- Around line 76-82: The container exposes 27017 internally, but the code calls
MongoDBContainer.withExposedPorts(properties.getPort()) and later
mongodb.getMappedPort(properties.getPort()), causing lookup failures when
properties.getPort() != 27017; remove the withExposedPorts(properties.getPort())
calls and instead keep the container's default exposure, introduce or use a
constant for the internal port (e.g. MONGODB_INTERNAL_PORT = 27017) and replace
any mongodb.getMappedPort(properties.getPort()) calls with
mongodb.getMappedPort(MONGODB_INTERNAL_PORT) (update usages in
EmbeddedMongodbBootstrapConfiguration around the mongodb variable and any
interactions with properties.getPort()); if you intend to support non-default
internal ports, reconfigure the MongoDB daemon startup instead of changing
withExposedPorts.
In
`@embedded-neo4j/src/main/java/com/playtika/testcontainer/neo4j/EmbeddedNeo4jDependenciesAutoConfiguration.java`:
- Line 20: The `@AutoConfiguration` annotation on
EmbeddedNeo4jDependenciesAutoConfiguration uses the wrong afterName; change the
string "org.springframework.boot.neo4j.autoconfigure.Neo4jDataAutoConfiguration"
to the Spring Boot 4.x class name
"org.springframework.boot.data.neo4j.autoconfigure.DataNeo4jAutoConfiguration"
so the auto-configuration ordering for
EmbeddedNeo4jDependenciesAutoConfiguration is applied correctly.
In `@embedded-rabbitmq/pom.xml`:
- Around line 26-33: The POM change makes
org.springframework.boot:spring-boot-amqp a non-optional transitive dependency
(artifactId spring-boot-amqp) which will force AMQP onto all consumers of the
embedded-rabbitmq library; if that was not intended, revert to the previous
optional dependency (org.springframework.amqp:spring-rabbit with
<optional>true</optional>) or mark the new spring-boot-amqp dependency as
optional/test scope so AMQP is not pulled transitively — update the dependency
block for spring-boot-amqp accordingly or restore the former dependency to
ensure the module remains non-invasive to consumers who don't use AMQP.
In
`@embedded-rabbitmq/src/main/java/com/playtika/testcontainer/rabbitmq/EmbeddedRabbitMQBootstrapConfiguration.java`:
- Around line 79-84: The execInContainer call in
EmbeddedRabbitMQBootstrapConfiguration currently ignores the ExecResult from
rabbitMQ.execInContainer(command...), so plugin enablement failures are silent;
update the code to capture the ExecResult, check its getExitCode() (or
isSuccessful equivalent), and if non-zero throw or log a descriptive exception
containing the exit code, stdout and stderr so test failure is explicit (include
the original command and properties.getEnabledPlugins() in the message); ensure
this check is applied to the rabbitMQ.execInContainer(...) call that enables
plugins.
---
Minor comments:
In `@embedded-clickhouse/README.adoc`:
- Line 47: The JDBC URL in the README is missing an explicit HTTP(S) protocol
required by the ClickHouse driver; update the example JDBC URL that currently
starts with "jdbc:clickhouse://${embedded.clickhouse.host}:..." to include the
protocol like "jdbc:clickhouse:http://${embedded.clickhouse.host}:..." (or
"jdbc:clickhouse:https://..." if using TLS) so it matches the
com.clickhouse.jdbc.Driver requirement.
In
`@embedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/EmbeddedDynamoDBBootstrapConfigurationTest.java`:
- Around line 56-62: The test should assert the bean definition's dependsOn
metadata rather than only existence: in the test method
shouldSetupDependsOnForAllDataAmazonDBs, after locating the bean name via
BeanFactoryUtils.beanNamesForTypeIncludingAncestors(beanFactory,
DynamoDbClient.class) and confirming "dynamoDbClient" exists, retrieve the
BeanDefinition from the beanFactory (using
beanFactory.getBeanDefinition("dynamoDbClient") or equivalent) and assert its
dependsOn contains the embedded startup bean(s) (the expected dependency
name(s)); alternatively, if the test intent changed, rename
shouldSetupDependsOnForAllDataAmazonDBs to reflect the narrower contract and
update assertions accordingly.
In
`@embedded-neo4j/src/main/java/com/playtika/testcontainer/neo4j/EmbeddedNeo4jBootstrapConfiguration.java`:
- Line 62: Update all Neo4jContainer declarations to include the wildcard
generic to suppress unchecked warnings: change the method parameter type, the
method return type, the local variable declaration (neo4j), the cast, and the
other method parameter in EmbeddedNeo4jBootstrapConfiguration so they use
Neo4jContainer<?> instead of raw Neo4jContainer; ensure every occurrence
(variable neo4j, the cast site, and both method signatures) is updated
consistently.
In `@embedded-pulsar/pom.xml`:
- Around line 63-67: Add the missing Spring Boot REST client dependency by
declaring a dependency with groupId org.springframework.boot and artifactId
spring-boot-restclient (no test scope) alongside the existing
spring-boot-resttestclient dependency; update the Maven dependencies block so
both artifactIds (spring-boot-resttestclient and spring-boot-restclient) are
present to satisfy Spring Boot 4.0 requirements.
---
Nitpick comments:
In
`@embedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/springdata/User.java`:
- Around line 23-29: The User mapping currently only marks getId() with
`@DynamoDbPartitionKey` while setupTable() creates a composite key with id as the
partition key and firstName as the sort key; update the User bean so the getter
for firstName (getFirstName()) is annotated with `@DynamoDbSortKey` (or
alternatively change setupTable() to remove the RANGE/sort key if you intend a
single-key table) to keep key annotations aligned with the table schema and
ensure enhanced-client queries derive correct key semantics.
In `@embedded-git/pom.xml`:
- Line 8: The POMs currently use a project-wide
<version>4.0.0-SNAPSHOT</version> intentionally for development; no code change
is required — keep the <version> element as is in pom.xml and ensure the release
workflow (the step that runs versions:set) remains configured to strip the
-SNAPSHOT suffix at release time so released artifacts use 4.0.0; verify the
release job that invokes versions:set is present and tested in CI/CD to avoid
committing a snapshot as a release.
In `@embedded-neo4j/pom.xml`:
- Around line 16-17: Remove the now-empty <properties> block from the POM to
clean up the project descriptor: locate the <properties> element in the pom.xml
(the block shown in the diff) and delete the entire <properties>...</properties>
section since it contains no properties like neo4j-java-driver.version anymore.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| ToxiproxyClientProxy db2ContainerProxy(ToxiproxyClient toxiproxyClient, | ||
| ToxiproxyContainer toxiproxyContainer, | ||
| @Qualifier(BEAN_NAME_EMBEDDED_DB2) Db2Container db2, | ||
| @Qualifier(BEAN_NAME_EMBEDDED_DB2) GenericContainer<?> db2, |
There was a problem hiding this comment.
ToxiproxyHelper#createProxy only accepts GenericContainer as a parameter,I don't know if there is a better solution
There was a problem hiding this comment.
But it worked previously, and there were no changes to ToxiproxyHelper#createProxy.
Maybe the new Db2Container isn't a GenericContainer anymore?
There was a problem hiding this comment.
Db2Container will cause compilation failure.
In testcontainers 2.0. x, org.testcontainers.containers.ToxiproxyContainer has been marked as Depreciated and replaced with org.testcontainers.toxiproxy.ToxiproxyContainer
https://github.com/m1ngyuan/testcontainers-spring-boot/blob/53fce26c27c58ce530ed35ecffacf51b1245d9bb/embedded-toxiproxy/src/main/java/com/playtika/testcontainer/toxiproxy/ToxiproxyHelper.java#L10
There was a problem hiding this comment.
we also checked that repository works
| </dependency> | ||
| <dependency> | ||
| <groupId>com.fasterxml.jackson.core</groupId> | ||
| <groupId>tools.jackson.core</groupId> |
There was a problem hiding this comment.
revert this change. Are we considering migrating to Jackson 3 ?
| ToxiproxyClientProxy mariadbContainerProxy(ToxiproxyClient toxiproxyClient, | ||
| ToxiproxyContainer toxiproxyContainer, | ||
| @Qualifier(BEAN_NAME_EMBEDDED_MARIADB) MariaDBContainer mariadbContainer, | ||
| @Qualifier(BEAN_NAME_EMBEDDED_MARIADB) GenericContainer<?> mariadbContainer, |
There was a problem hiding this comment.
ToxiproxyHelper#createProxy only accepts GenericContainer as a parameter,I don't know if there is a better solution
|
Could you please remove 4.0.0-SNAPSHOT, as it will be 4.0.0 by our release workflow. |
|
CI failed |
8432ade to
67fcb01
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (3)
embedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/springdata/User.java (1)
28-29: MarkfirstNameas a sort-key to align with table schema.The table schema defines
firstNameas aRANGEkey (inEmbeddedDynamoDBBootstrapConfigurationTest.javaline 85), but the User entity annotates it with@DynamoDbAttributeinstead of@DynamoDbSortKey. Use@DynamoDbSortKeyon thegetFirstName()method to keep entity metadata consistent with the schema definition.Suggested diff
-import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbAttribute; import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbBean; import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbPartitionKey; +import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbSortKey; @@ - `@DynamoDbAttribute`("firstName") + `@DynamoDbSortKey` public String getFirstName() { return firstName; }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/springdata/User.java` around lines 28 - 29, The User entity marks firstName with `@DynamoDbAttribute` but the table schema expects firstName to be the RANGE (sort) key; update the getter getFirstName() in class User to use `@DynamoDbSortKey` instead of `@DynamoDbAttribute` so the entity metadata matches the table schema and DynamoDB mapping (ensure imports/annotations are adjusted accordingly).embedded-mongodb/src/main/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapConfiguration.java (1)
110-110: Consider aligning parameter type with other modules.The
registerMongodbEnvironmentmethod still usesGenericContainer<?>parameter, while similar methods in other modules (e.g.,embedded-minioline 94,embedded-mssqlserverline 89) use their concrete container types. Consider changing toMongoDBContainerfor consistency.♻️ Suggested change for consistency
- private void registerMongodbEnvironment(GenericContainer<?> mongodb, ConfigurableEnvironment environment, MongodbProperties properties) { + private void registerMongodbEnvironment(MongoDBContainer mongodb, ConfigurableEnvironment environment, MongodbProperties properties) {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-mongodb/src/main/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapConfiguration.java` at line 110, Change the registerMongodbEnvironment method signature to accept the concrete MongoDBContainer type instead of GenericContainer<?> — update the method declaration for registerMongodbEnvironment to use MongoDBContainer, adjust any imports to import org.testcontainers.containers.MongoDBContainer, and update all call sites (e.g., where registerMongodbEnvironment is invoked) to pass a MongoDBContainer instance so the method signature and usages match other modules’ concrete container types.embedded-mssqlserver/src/main/java/com/playtika/testcontainer/mssqlserver/EmbeddedMSSQLServerBootstrapConfiguration.java (1)
60-87:EmbeddedMSSQLServerContainerclass is unused and can be removed.The bean now instantiates
MSSQLServerContainerdirectly. TheEmbeddedMSSQLServerContainerclass has no usages anywhere in the codebase and only provides passthrough constructors with no additional functionality. Remove this dead code.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-mssqlserver/src/main/java/com/playtika/testcontainer/mssqlserver/EmbeddedMSSQLServerBootstrapConfiguration.java` around lines 60 - 87, Remove the dead wrapper class EmbeddedMSSQLServerContainer since the bean now constructs MSSQLServerContainer directly: delete the EmbeddedMSSQLServerContainer class file (and its constructors) and remove any imports/usages referencing EmbeddedMSSQLServerContainer so compilation still succeeds; scan for references to EmbeddedMSSQLServerContainer (e.g., in tests, configs or other beans) and update them to use MSSQLServerContainer or the existing BEAN_NAME_EMBEDDED_MSSQLSERVER bean where appropriate, then run a build to ensure nothing else depends on the removed class.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@embedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationTest.java`:
- Around line 31-33: The test registers an async callback on
client.putValue("key", "val") that runs on Vert.x's event loop so JUnit may
finish before the assertion executes; change the test to wait for completion by
converting the Vert.x Future/Promise to a CompletionStage and blocking until
complete (e.g., use
client.putValue(...).toCompletionStage().toCompletableFuture().join()) and then
perform the assertion on the returned result; apply the same change in
EmbeddedConsulBootstrapConfigurationConfigTest.shouldUpdateKeyForbidden() to
ensure assertions run on the test thread and failures propagate to JUnit.
In
`@embedded-influxdb/src/main/java/com/playtika/testcontainer/influxdb/EmbeddedInfluxDBBootstrapConfiguration.java`:
- Around line 73-75: In EmbeddedInfluxDBBootstrapConfiguration, remove the
redundant .withExposedPorts(properties.getPort()) call so only
.withExposedPorts(INFLUXDB_PORT) is used, and update the mapped port resolution
(the code that calls getMappedPort(properties.getPort())) to use
getMappedPort(INFLUXDB_PORT) instead; this ensures the container exposes and
queries the same INFLUXDB_PORT constant and prevents port mismatch when
properties.getPort() is overridden.
In
`@embedded-minio/src/main/java/com/playtika/testcontainer/minio/EmbeddedMinioBootstrapConfiguration.java`:
- Around line 20-22: The import for MinIOContainer is incorrect: update the
import statement that references MinIOContainer so it uses the Testcontainers
2.x module package (change org.testcontainers.containers.MinIOContainer to
org.testcontainers.minio.MinIOContainer) in the
EmbeddedMinioBootstrapConfiguration class; keep the rest of the imports
(Network, ToxiproxyContainer) unchanged so references to MinIOContainer
throughout this file continue to resolve to the correct class.
In
`@embedded-rabbitmq/src/main/java/com/playtika/testcontainer/rabbitmq/EmbeddedRabbitMQBootstrapConfiguration.java`:
- Around line 79-85: The plugin enable step currently ignores
rabbitMQ.execInContainer(...) return value; change it to capture the ExecResult
(from rabbitMQ.execInContainer), call getExitCode() and if non-zero log the
stdout/stderr (getStdout()/getStderr()) and fail fast (throw an
IllegalStateException) so failed "rabbitmq-plugins enable" calls are detected;
update the block that uses properties.getEnabledPlugins() to use the ExecResult
variable and validate getExitCode() before continuing.
---
Nitpick comments:
In
`@embedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/springdata/User.java`:
- Around line 28-29: The User entity marks firstName with `@DynamoDbAttribute` but
the table schema expects firstName to be the RANGE (sort) key; update the getter
getFirstName() in class User to use `@DynamoDbSortKey` instead of
`@DynamoDbAttribute` so the entity metadata matches the table schema and DynamoDB
mapping (ensure imports/annotations are adjusted accordingly).
In
`@embedded-mongodb/src/main/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapConfiguration.java`:
- Line 110: Change the registerMongodbEnvironment method signature to accept the
concrete MongoDBContainer type instead of GenericContainer<?> — update the
method declaration for registerMongodbEnvironment to use MongoDBContainer,
adjust any imports to import org.testcontainers.containers.MongoDBContainer, and
update all call sites (e.g., where registerMongodbEnvironment is invoked) to
pass a MongoDBContainer instance so the method signature and usages match other
modules’ concrete container types.
In
`@embedded-mssqlserver/src/main/java/com/playtika/testcontainer/mssqlserver/EmbeddedMSSQLServerBootstrapConfiguration.java`:
- Around line 60-87: Remove the dead wrapper class EmbeddedMSSQLServerContainer
since the bean now constructs MSSQLServerContainer directly: delete the
EmbeddedMSSQLServerContainer class file (and its constructors) and remove any
imports/usages referencing EmbeddedMSSQLServerContainer so compilation still
succeeds; scan for references to EmbeddedMSSQLServerContainer (e.g., in tests,
configs or other beans) and update them to use MSSQLServerContainer or the
existing BEAN_NAME_EMBEDDED_MSSQLSERVER bean where appropriate, then run a build
to ensure nothing else depends on the removed class.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 32a1d6a3-a4d5-4db9-ac39-cf19efaeb693
📒 Files selected for processing (123)
README.adocembedded-aerospike/src/main/java/com/playtika/testcontainer/aerospike/EmbeddedAerospikeBootstrapConfiguration.javaembedded-artifactory/pom.xmlembedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.javaembedded-azurite/src/main/java/com/playtika/testcontainer/azurite/EmbeddedAzuriteBootstrapConfiguration.javaembedded-cassandra/pom.xmlembedded-cassandra/src/main/java/com/playtika/testcontainer/cassandra/EmbeddedCassandraBootstrapConfiguration.javaembedded-clickhouse/README.adocembedded-clickhouse/pom.xmlembedded-clickhouse/src/main/java/com/playtika/testcontainer/clickhouse/ClickHouseProperties.javaembedded-clickhouse/src/main/java/com/playtika/testcontainer/clickhouse/EmbeddedClickHouseBootstrapConfiguration.javaembedded-clickhouse/src/main/java/com/playtika/testcontainer/clickhouse/EmbeddedClickHouseDependenciesAutoConfiguration.javaembedded-clickhouse/src/test/resources/application-enabled.propertiesembedded-cockroachdb/pom.xmlembedded-cockroachdb/src/main/java/com/playtika/testcontainer/cockroach/EmbeddedCockroachDBBootstrapConfiguration.javaembedded-consul/pom.xmlembedded-consul/src/main/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfiguration.javaembedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationBaseTest.javaembedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationConfigTest.javaembedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationTest.javaembedded-couchbase/pom.xmlembedded-couchbase/src/main/java/com/playtika/testcontainer/couchbase/EmbeddedCouchbaseBootstrapConfiguration.javaembedded-db2/pom.xmlembedded-db2/src/main/java/com/playtika/testcontainer/db2/EmbeddedDb2BootstrapConfiguration.javaembedded-dynamodb/pom.xmlembedded-dynamodb/src/main/java/com/playtika/testcontainer/dynamodb/EmbeddedDynamoDBBootstrapConfiguration.javaembedded-dynamodb/src/main/java/com/playtika/testcontainer/dynamodb/EmbeddedDynamoDBDependenciesAutoConfiguration.javaembedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/EmbeddedDynamoDBBootstrapConfigurationTest.javaembedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/springdata/DynamoDBConfig.javaembedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/springdata/User.javaembedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/springdata/UserRepository.javaembedded-dynamodb/src/test/resources/application-enabled.propertiesembedded-elasticsearch/pom.xmlembedded-elasticsearch/src/main/java/com/playtika/testcontainer/elasticsearch/EmbeddedElasticSearchBootstrapConfiguration.javaembedded-elasticsearch/src/main/java/com/playtika/testcontainer/elasticsearch/EmbeddedElasticSearchRestClientDependenciesAutoConfiguration.javaembedded-elasticsearch/src/test/java/com/playtika/testcontainer/elasticsearch/springdata/SpringDataTest.javaembedded-git/src/main/java/com/playtika/testcontainer/git/EmbeddedGitBootstrapConfiguration.javaembedded-git/src/test/java/EmbeddedGitBootstrapConfigurationTest.javaembedded-git/src/test/java/util/EncryptionUtils.javaembedded-google-pubsub/pom.xmlembedded-google-pubsub/src/main/java/com/playtika/testcontainer/pubsub/EmbeddedPubsubBootstrapConfiguration.javaembedded-google-storage/pom.xmlembedded-google-storage/src/main/java/com/playtika/testcontainer/storage/EmbeddedStorageBootstrapConfiguration.javaembedded-grafana/pom.xmlembedded-grafana/src/main/java/com/playtika/testcontainer/grafana/EmbeddedGrafanaBootstrapConfiguration.javaembedded-influxdb/pom.xmlembedded-influxdb/src/main/java/com/playtika/testcontainer/influxdb/EmbeddedInfluxDBBootstrapConfiguration.javaembedded-k3s/pom.xmlembedded-kafka/pom.xmlembedded-kafka/src/main/java/com/playtika/testcontainer/kafka/configuration/KafkaContainerConfiguration.javaembedded-kafka/src/test/java/com/playtika/testcontainer/kafka/EmbeddedSchemaRegistryAuthTest.javaembedded-kafka/src/test/java/com/playtika/testcontainer/kafka/EmbeddedSchemaRegistryTest.javaembedded-keycloak/pom.xmlembedded-keycloak/src/main/java/com/playtika/testcontainer/keycloak/EmbeddedKeycloakBootstrapConfiguration.javaembedded-keydb/pom.xmlembedded-keydb/src/main/java/com/playtika/testcontainer/keydb/EmbeddedKeyDbBootstrapConfiguration.javaembedded-localstack/pom.xmlembedded-localstack/src/main/java/com/playtika/testcontainer/localstack/EmbeddedLocalStackBootstrapConfiguration.javaembedded-mailhog/src/main/java/com/playtika/testcontainer/mailhog/EmbeddedMailHogBootstrapConfiguration.javaembedded-mariadb/pom.xmlembedded-mariadb/src/main/java/com/playtika/testcontainer/mariadb/EmbeddedMariaDBBootstrapConfiguration.javaembedded-memsql/pom.xmlembedded-memsql/src/main/java/com/playtika/testcontainer/memsql/EmbeddedMemSqlBootstrapConfiguration.javaembedded-minio/pom.xmlembedded-minio/src/main/java/com/playtika/testcontainer/minio/EmbeddedMinioBootstrapConfiguration.javaembedded-mockserver/pom.xmlembedded-mongodb/README.adocembedded-mongodb/pom.xmlembedded-mongodb/src/main/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapConfiguration.javaembedded-mongodb/src/test/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapAuthConfigurationTest.javaembedded-mongodb/src/test/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapConfigurationTest.javaembedded-mongodb/src/test/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapReplicaSetConfigurationTest.javaembedded-mssqlserver/pom.xmlembedded-mssqlserver/src/main/java/com/playtika/testcontainer/mssqlserver/EmbeddedMSSQLServerBootstrapConfiguration.javaembedded-mssqlserver/src/main/java/com/playtika/testcontainer/mssqlserver/EmbeddedMSSQLServerContainer.javaembedded-mssqlserver/src/test/java/com/playtika/testcontainer/mssqlserver/EmbeddedMSSQLServerDependenciesAutoConfigurationTest.javaembedded-mysql/pom.xmlembedded-mysql/src/main/java/com/playtika/testcontainer/mysql/EmbeddedMySQLBootstrapConfiguration.javaembedded-mysql/src/main/java/com/playtika/testcontainer/mysql/EmbeddedMySQLTestOperationsAutoConfiguration.javaembedded-native-kafka/pom.xmlembedded-nats/pom.xmlembedded-nats/src/main/java/com/playtika/testcontainer/nats/EmbeddedNatsBootstrapConfiguration.javaembedded-neo4j/pom.xmlembedded-neo4j/src/main/java/com/playtika/testcontainer/neo4j/EmbeddedNeo4jBootstrapConfiguration.javaembedded-neo4j/src/main/java/com/playtika/testcontainer/neo4j/EmbeddedNeo4jDependenciesAutoConfiguration.javaembedded-opensearch/pom.xmlembedded-opensearch/src/main/java/com/playtika/testcontainer/opensearch/EmbeddedOpenSearchBootstrapConfiguration.javaembedded-opensearch/src/main/java/com/playtika/testcontainer/opensearch/OpenSearchContainerFactory.javaembedded-opensearch/src/test/java/com/playtika/testcontainer/opensearch/EmbeddedOpenSearchBootstrapConfigurationTest.javaembedded-oracle-xe/pom.xmlembedded-oracle-xe/src/main/java/com/playtika/testcontainer/oracle/EmbeddedOracleBootstrapConfiguration.javaembedded-postgresql/pom.xmlembedded-postgresql/src/main/java/com/playtika/testcontainer/postgresql/EmbeddedPostgreSQLBootstrapConfiguration.javaembedded-prometheus/pom.xmlembedded-prometheus/src/main/java/com/playtika/testcontainer/prometheus/EmbeddedPrometheusBootstrapConfiguration.javaembedded-pulsar/pom.xmlembedded-pulsar/src/main/java/com/playtika/testcontainer/pulsar/EmbeddedPulsarBootstrapConfiguration.javaembedded-pulsar/src/test/java/com/playtika/testcontainer/pulsar/EmbeddedPulsarBootstrapConfigurationTest.javaembedded-pulsar/src/test/java/com/playtika/testcontainer/pulsar/EmbeddedPulsarHttpServiceTest.javaembedded-rabbitmq/pom.xmlembedded-rabbitmq/src/main/java/com/playtika/testcontainer/rabbitmq/EmbeddedRabbitMQBootstrapConfiguration.javaembedded-rabbitmq/src/main/java/com/playtika/testcontainer/rabbitmq/EmbeddedRabbitMQDependenciesAutoConfiguration.javaembedded-redis/pom.xmlembedded-redis/src/main/java/com/playtika/testcontainer/redis/EmbeddedRedisBootstrapConfiguration.javaembedded-selenium/pom.xmlembedded-solr/pom.xmlembedded-solr/src/main/java/com/playtika/testcontainer/solr/EmbeddedSolrBootstrapConfiguration.javaembedded-solr/src/test/java/com/playtika/testcontainer/solr/BaseSolrTest.javaembedded-spicedb/src/main/java/com/playtika/testcontainer/spicedb/EmbeddedSpiceDBBootstrapConfiguration.javaembedded-toxiproxy/pom.xmlembedded-toxiproxy/src/main/java/com/playtika/testcontainer/toxiproxy/EmbeddedToxiProxyBootstrapConfiguration.javaembedded-toxiproxy/src/main/java/com/playtika/testcontainer/toxiproxy/ToxiproxyHelper.javaembedded-toxiproxy/src/test/java/com/playtika/testcontainer/toxiproxy/EmbeddedToxiProxyBootstrapConfigurationTest.javaembedded-vault/pom.xmlembedded-vault/src/main/java/com/playtika/testcontainer/vault/EmbeddedVaultBootstrapConfiguration.javaembedded-vertica/pom.xmlembedded-vertica/src/main/java/com/playtika/testcontainer/vertica/EmbeddedVerticaBootstrapConfiguration.javaembedded-victoriametrics/pom.xmlembedded-victoriametrics/src/main/java/com/playtika/testcontainer/victoriametrics/EmbeddedVictoriaMetricsBootstrapConfiguration.javaembedded-wiremock/pom.xmlpom.xmltestcontainers-common/src/test/java/com/playtika/testcontainer/common/spring/DockerPresenceMarkerTest.javatestcontainers-spring-boot-parent/pom.xml
💤 Files with no reviewable changes (8)
- embedded-artifactory/pom.xml
- embedded-google-pubsub/pom.xml
- embedded-google-storage/pom.xml
- embedded-prometheus/pom.xml
- embedded-victoriametrics/pom.xml
- pom.xml
- embedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/springdata/DynamoDBConfig.java
- embedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/springdata/UserRepository.java
✅ Files skipped from review due to trivial changes (60)
- README.adoc
- embedded-aerospike/src/main/java/com/playtika/testcontainer/aerospike/EmbeddedAerospikeBootstrapConfiguration.java
- embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.java
- embedded-clickhouse/README.adoc
- embedded-clickhouse/src/main/java/com/playtika/testcontainer/clickhouse/EmbeddedClickHouseBootstrapConfiguration.java
- embedded-clickhouse/src/main/java/com/playtika/testcontainer/clickhouse/EmbeddedClickHouseDependenciesAutoConfiguration.java
- embedded-clickhouse/src/test/resources/application-enabled.properties
- embedded-dynamodb/src/main/java/com/playtika/testcontainer/dynamodb/EmbeddedDynamoDBBootstrapConfiguration.java
- embedded-elasticsearch/src/test/java/com/playtika/testcontainer/elasticsearch/springdata/SpringDataTest.java
- embedded-git/src/test/java/EmbeddedGitBootstrapConfigurationTest.java
- embedded-google-pubsub/src/main/java/com/playtika/testcontainer/pubsub/EmbeddedPubsubBootstrapConfiguration.java
- embedded-google-storage/src/main/java/com/playtika/testcontainer/storage/EmbeddedStorageBootstrapConfiguration.java
- embedded-grafana/src/main/java/com/playtika/testcontainer/grafana/EmbeddedGrafanaBootstrapConfiguration.java
- embedded-k3s/pom.xml
- embedded-kafka/src/main/java/com/playtika/testcontainer/kafka/configuration/KafkaContainerConfiguration.java
- embedded-kafka/src/test/java/com/playtika/testcontainer/kafka/EmbeddedSchemaRegistryAuthTest.java
- embedded-mailhog/src/main/java/com/playtika/testcontainer/mailhog/EmbeddedMailHogBootstrapConfiguration.java
- embedded-memsql/pom.xml
- embedded-memsql/src/main/java/com/playtika/testcontainer/memsql/EmbeddedMemSqlBootstrapConfiguration.java
- embedded-minio/pom.xml
- embedded-mongodb/README.adoc
- embedded-mongodb/pom.xml
- embedded-mongodb/src/test/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapConfigurationTest.java
- embedded-mysql/src/main/java/com/playtika/testcontainer/mysql/EmbeddedMySQLTestOperationsAutoConfiguration.java
- embedded-native-kafka/pom.xml
- embedded-postgresql/src/main/java/com/playtika/testcontainer/postgresql/EmbeddedPostgreSQLBootstrapConfiguration.java
- embedded-nats/src/main/java/com/playtika/testcontainer/nats/EmbeddedNatsBootstrapConfiguration.java
- embedded-oracle-xe/src/main/java/com/playtika/testcontainer/oracle/EmbeddedOracleBootstrapConfiguration.java
- embedded-opensearch/src/main/java/com/playtika/testcontainer/opensearch/OpenSearchContainerFactory.java
- embedded-neo4j/src/main/java/com/playtika/testcontainer/neo4j/EmbeddedNeo4jBootstrapConfiguration.java
- embedded-rabbitmq/src/main/java/com/playtika/testcontainer/rabbitmq/EmbeddedRabbitMQDependenciesAutoConfiguration.java
- embedded-selenium/pom.xml
- embedded-toxiproxy/src/main/java/com/playtika/testcontainer/toxiproxy/ToxiproxyHelper.java
- embedded-vault/src/main/java/com/playtika/testcontainer/vault/EmbeddedVaultBootstrapConfiguration.java
- embedded-vault/pom.xml
- embedded-vertica/pom.xml
- embedded-spicedb/src/main/java/com/playtika/testcontainer/spicedb/EmbeddedSpiceDBBootstrapConfiguration.java
- testcontainers-common/src/test/java/com/playtika/testcontainer/common/spring/DockerPresenceMarkerTest.java
- embedded-vertica/src/main/java/com/playtika/testcontainer/vertica/EmbeddedVerticaBootstrapConfiguration.java
- embedded-victoriametrics/src/main/java/com/playtika/testcontainer/victoriametrics/EmbeddedVictoriaMetricsBootstrapConfiguration.java
- embedded-clickhouse/pom.xml
- embedded-clickhouse/src/main/java/com/playtika/testcontainer/clickhouse/ClickHouseProperties.java
- embedded-cockroachdb/pom.xml
- embedded-cockroachdb/src/main/java/com/playtika/testcontainer/cockroach/EmbeddedCockroachDBBootstrapConfiguration.java
- embedded-dynamodb/pom.xml
- embedded-dynamodb/src/test/resources/application-enabled.properties
- embedded-git/src/test/java/util/EncryptionUtils.java
- embedded-kafka/src/test/java/com/playtika/testcontainer/kafka/EmbeddedSchemaRegistryTest.java
- embedded-keydb/pom.xml
- embedded-keycloak/src/main/java/com/playtika/testcontainer/keycloak/EmbeddedKeycloakBootstrapConfiguration.java
- embedded-localstack/src/main/java/com/playtika/testcontainer/localstack/EmbeddedLocalStackBootstrapConfiguration.java
- embedded-mariadb/pom.xml
- embedded-mssqlserver/src/main/java/com/playtika/testcontainer/mssqlserver/EmbeddedMSSQLServerContainer.java
- embedded-mysql/pom.xml
- embedded-neo4j/src/main/java/com/playtika/testcontainer/neo4j/EmbeddedNeo4jDependenciesAutoConfiguration.java
- embedded-opensearch/pom.xml
- embedded-nats/pom.xml
- embedded-redis/pom.xml
- embedded-solr/pom.xml
- embedded-wiremock/pom.xml
🚧 Files skipped from review as they are similar to previous changes (43)
- embedded-azurite/src/main/java/com/playtika/testcontainer/azurite/EmbeddedAzuriteBootstrapConfiguration.java
- embedded-couchbase/pom.xml
- embedded-db2/pom.xml
- embedded-elasticsearch/src/main/java/com/playtika/testcontainer/elasticsearch/EmbeddedElasticSearchRestClientDependenciesAutoConfiguration.java
- embedded-influxdb/pom.xml
- embedded-keycloak/pom.xml
- embedded-localstack/pom.xml
- embedded-mockserver/pom.xml
- embedded-mongodb/src/test/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapAuthConfigurationTest.java
- embedded-postgresql/pom.xml
- embedded-pulsar/src/test/java/com/playtika/testcontainer/pulsar/EmbeddedPulsarBootstrapConfigurationTest.java
- embedded-rabbitmq/pom.xml
- embedded-oracle-xe/pom.xml
- embedded-pulsar/src/test/java/com/playtika/testcontainer/pulsar/EmbeddedPulsarHttpServiceTest.java
- embedded-toxiproxy/pom.xml
- embedded-cassandra/pom.xml
- embedded-consul/src/main/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfiguration.java
- embedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationBaseTest.java
- embedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationConfigTest.java
- embedded-couchbase/src/main/java/com/playtika/testcontainer/couchbase/EmbeddedCouchbaseBootstrapConfiguration.java
- embedded-elasticsearch/src/main/java/com/playtika/testcontainer/elasticsearch/EmbeddedElasticSearchBootstrapConfiguration.java
- embedded-grafana/pom.xml
- embedded-kafka/pom.xml
- embedded-keydb/src/main/java/com/playtika/testcontainer/keydb/EmbeddedKeyDbBootstrapConfiguration.java
- embedded-mariadb/src/main/java/com/playtika/testcontainer/mariadb/EmbeddedMariaDBBootstrapConfiguration.java
- embedded-mongodb/src/test/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapReplicaSetConfigurationTest.java
- embedded-mysql/src/main/java/com/playtika/testcontainer/mysql/EmbeddedMySQLBootstrapConfiguration.java
- embedded-mssqlserver/src/test/java/com/playtika/testcontainer/mssqlserver/EmbeddedMSSQLServerDependenciesAutoConfigurationTest.java
- embedded-mssqlserver/pom.xml
- embedded-neo4j/pom.xml
- embedded-opensearch/src/test/java/com/playtika/testcontainer/opensearch/EmbeddedOpenSearchBootstrapConfigurationTest.java
- embedded-redis/src/main/java/com/playtika/testcontainer/redis/EmbeddedRedisBootstrapConfiguration.java
- embedded-toxiproxy/src/main/java/com/playtika/testcontainer/toxiproxy/EmbeddedToxiProxyBootstrapConfiguration.java
- embedded-toxiproxy/src/test/java/com/playtika/testcontainer/toxiproxy/EmbeddedToxiProxyBootstrapConfigurationTest.java
- embedded-solr/src/test/java/com/playtika/testcontainer/solr/BaseSolrTest.java
- embedded-consul/pom.xml
- embedded-git/src/main/java/com/playtika/testcontainer/git/EmbeddedGitBootstrapConfiguration.java
- embedded-opensearch/src/main/java/com/playtika/testcontainer/opensearch/EmbeddedOpenSearchBootstrapConfiguration.java
- embedded-pulsar/src/main/java/com/playtika/testcontainer/pulsar/EmbeddedPulsarBootstrapConfiguration.java
- embedded-db2/src/main/java/com/playtika/testcontainer/db2/EmbeddedDb2BootstrapConfiguration.java
- embedded-solr/src/main/java/com/playtika/testcontainer/solr/EmbeddedSolrBootstrapConfiguration.java
- testcontainers-spring-boot-parent/pom.xml
- embedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/EmbeddedDynamoDBBootstrapConfigurationTest.java
| client.putValue("key", "val").onComplete(res ->{ | ||
| assertThat(res.result()).isEqualTo(true); | ||
| }); |
There was a problem hiding this comment.
Async callback not awaited — test may pass even when assertion fails.
The onComplete callback executes asynchronously on Vert.x's event loop. The test method returns immediately after registering the callback, so:
- The assertion may never execute before JUnit marks the test as passed
- If the assertion fails, the exception won't propagate to JUnit (runs on a different thread)
This could explain flaky or false-positive test results. Use toCompletionStage() to block until the async operation completes:
🐛 Proposed fix using CompletionStage
`@Test`
- public void shouldUpdateKey() {
+ public void shouldUpdateKey() throws Exception {
ConsulClient client = buildClient();
- client.putValue("key", "val").onComplete(res ->{
- assertThat(res.result()).isEqualTo(true);
- });
+ Boolean result = client.putValue("key", "val")
+ .toCompletionStage()
+ .toCompletableFuture()
+ .get(10, java.util.concurrent.TimeUnit.SECONDS);
+ assertThat(result).isTrue();
}Note: The sibling test EmbeddedConsulBootstrapConfigurationConfigTest.shouldUpdateKeyForbidden() has the same issue and should be fixed similarly.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| client.putValue("key", "val").onComplete(res ->{ | |
| assertThat(res.result()).isEqualTo(true); | |
| }); | |
| Boolean result = client.putValue("key", "val") | |
| .toCompletionStage() | |
| .toCompletableFuture() | |
| .get(10, java.util.concurrent.TimeUnit.SECONDS); | |
| assertThat(result).isTrue(); |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@embedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationTest.java`
around lines 31 - 33, The test registers an async callback on
client.putValue("key", "val") that runs on Vert.x's event loop so JUnit may
finish before the assertion executes; change the test to wait for completion by
converting the Vert.x Future/Promise to a CompletionStage and blocking until
complete (e.g., use
client.putValue(...).toCompletionStage().toCompletableFuture().join()) and then
perform the assertion on the returned result; apply the same change in
EmbeddedConsulBootstrapConfigurationConfigTest.shouldUpdateKeyForbidden() to
ensure assertions run on the test thread and failures propagate to JUnit.
| .withExposedPorts(properties.getPort()) | ||
| .withNetworkAliases(INFLUXDB_NETWORK_ALIAS); | ||
| .withNetworkAliases(INFLUXDB_NETWORK_ALIAS) | ||
| .withExposedPorts(INFLUXDB_PORT); |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check what the default value for port is in InfluxDBProperties
ast-grep --pattern 'class InfluxDBProperties {
$$$
}'
# Also search for port field/getter definition
rg -n -A3 'private.*port|getPort|setPort' --type java -g '*InfluxDBProperties*'Repository: PlaytikaOSS/testcontainers-spring-boot
Length of output: 64
🏁 Script executed:
# Find InfluxDBProperties file
fd -type f -name '*InfluxDBProperties*'
# Find the EmbeddedInfluxDBBootstrapConfiguration file
fd -type f -name '*EmbeddedInfluxDBBootstrapConfiguration*'Repository: PlaytikaOSS/testcontainers-spring-boot
Length of output: 423
🏁 Script executed:
# Find InfluxDBProperties file
fd -t f 'InfluxDBProperties'
# Find the EmbeddedInfluxDBBootstrapConfiguration file
fd -t f 'EmbeddedInfluxDBBootstrapConfiguration'Repository: PlaytikaOSS/testcontainers-spring-boot
Length of output: 401
🏁 Script executed:
# Read InfluxDBProperties to find port field and default value
cat -n embedded-influxdb/src/main/java/com/playtika/testcontainer/influxdb/InfluxDBProperties.java
# Read EmbeddedInfluxDBBootstrapConfiguration to see context around lines 73-75 and 89
cat -n embedded-influxdb/src/main/java/com/playtika/testcontainer/influxdb/EmbeddedInfluxDBBootstrapConfiguration.javaRepository: PlaytikaOSS/testcontainers-spring-boot
Length of output: 8016
🏁 Script executed:
# Search for any references to INFLUXDB_PORT in the codebase
rg -n 'INFLUXDB_PORT' --type javaRepository: PlaytikaOSS/testcontainers-spring-boot
Length of output: 438
Consolidate redundant withExposedPorts calls to prevent port mismatch.
Lines 73 and 75 expose two ports, but since properties.getPort() defaults to 8086 (matching INFLUXDB_PORT), these are redundant. More importantly, if properties.getPort() is customized to a different value, line 75 overwrites the port exposed in line 73, but line 89 still retrieves the mapped port using the original properties.getPort() value, causing a mismatch.
Remove line 73 and update line 89 to consistently use INFLUXDB_PORT:
♻️ Suggested fix
influxDBContainer
.withAdmin(properties.getAdminUser())
.withAdminPassword(properties.getAdminPassword())
.withAuthEnabled(properties.isEnableHttpAuth())
.withUsername(properties.getUser())
.withPassword(properties.getPassword())
.withDatabase(properties.getDatabase())
- .withExposedPorts(properties.getPort())
.withNetworkAliases(INFLUXDB_NETWORK_ALIAS)
.withExposedPorts(INFLUXDB_PORT);- Integer mappedPort = influx.getMappedPort(properties.getPort());
+ Integer mappedPort = influx.getMappedPort(INFLUXDB_PORT);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@embedded-influxdb/src/main/java/com/playtika/testcontainer/influxdb/EmbeddedInfluxDBBootstrapConfiguration.java`
around lines 73 - 75, In EmbeddedInfluxDBBootstrapConfiguration, remove the
redundant .withExposedPorts(properties.getPort()) call so only
.withExposedPorts(INFLUXDB_PORT) is used, and update the mapped port resolution
(the code that calls getMappedPort(properties.getPort())) to use
getMappedPort(INFLUXDB_PORT) instead; this ensures the container exposes and
queries the same INFLUXDB_PORT constant and prevents port mismatch when
properties.getPort() is overridden.
| import org.testcontainers.containers.MinIOContainer; | ||
| import org.testcontainers.containers.Network; | ||
| import org.testcontainers.containers.ToxiproxyContainer; | ||
| import org.testcontainers.toxiproxy.ToxiproxyContainer; |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
Testcontainers 2.x MinIOContainer package location
💡 Result:
In Testcontainers 2.x for Java, the MinIOContainer class is located in the org.testcontainers.minio package. It is provided by the separate Maven/Gradle module org.testcontainers:testcontainers-minio (latest version 2.0.4 as of March 2026). Add this dependency: Maven: org.testcontainers testcontainers-minio 2.0.4 test Gradle: testImplementation 'org.testcontainers:testcontainers-minio:2.0.4' Usage example: MinIOContainer container = new MinIOContainer("minio/minio:RELEASE.2023-09-04T19-57-37Z"); This is confirmed by official Testcontainers documentation and Maven Central repository listings for 2.x versions.
Citations:
- 1: https://java.testcontainers.org/modules/minio/
- 2: https://www.testcontainers.org/modules/minio/
- 3: https://javadoc.io/doc/org.testcontainers/testcontainers-minio
- 4: https://repo1.maven.org/maven2/org/testcontainers/testcontainers-minio/
Update MinIOContainer import to use the correct module package.
Line 20 imports from org.testcontainers.containers.MinIOContainer, but MinIOContainer is located in the org.testcontainers.minio package in Testcontainers 2.x. Change the import to:
import org.testcontainers.minio.MinIOContainer;
This follows the module-specific package structure used by other Testcontainers 2.x modules (e.g., org.testcontainers.mongodb, org.testcontainers.mssqlserver).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@embedded-minio/src/main/java/com/playtika/testcontainer/minio/EmbeddedMinioBootstrapConfiguration.java`
around lines 20 - 22, The import for MinIOContainer is incorrect: update the
import statement that references MinIOContainer so it uses the Testcontainers
2.x module package (change org.testcontainers.containers.MinIOContainer to
org.testcontainers.minio.MinIOContainer) in the
EmbeddedMinioBootstrapConfiguration class; keep the rest of the imports
(Network, ToxiproxyContainer) unchanged so references to MinIOContainer
throughout this file continue to resolve to the correct class.
| if (properties.getEnabledPlugins() != null && !properties.getEnabledPlugins().isEmpty()) { | ||
| List<String> command = new ArrayList<>(properties.getEnabledPlugins().size() + 2); | ||
| command.add("rabbitmq-plugins"); | ||
| command.add("enable"); | ||
| command.addAll(properties.getEnabledPlugins()); | ||
| rabbitMQ.execInContainer(command.toArray(new String[0])); | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
In Testcontainers Java 2.x, does GenericContainer.execInContainer(...) throw on non-zero command exit, or must callers inspect ExecResult.getExitCode() explicitly?
💡 Result:
In Testcontainers Java 2.x, GenericContainer.execInContainer(...) does not throw on non-zero command exit codes. Callers must inspect ExecResult.getExitCode explicitly to check for success or failure.
Citations:
- 1: https://www.testcontainers.org/features/commands/
- 2: https://github.com/testcontainers/testcontainers-java/blob/master/core/src/main/java/org/testcontainers/containers/ExecInContainerPattern.java
- 3: https://java.testcontainers.org/features/commands/
- 4: https://java.testcontainers.org/
Validate RabbitMQ plugin activation exit code.
At line 84, execInContainer() returns an ExecResult but the return value is ignored. In Testcontainers 2.x, execInContainer() does not throw on non-zero command exits—callers must explicitly check getExitCode(). If the rabbitmq-plugins enable command fails, the container starts with plugins disabled, causing runtime failures that are difficult to diagnose.
Proposed fix
if (properties.getEnabledPlugins() != null && !properties.getEnabledPlugins().isEmpty()) {
List<String> command = new ArrayList<>(properties.getEnabledPlugins().size() + 2);
command.add("rabbitmq-plugins");
command.add("enable");
command.addAll(properties.getEnabledPlugins());
- rabbitMQ.execInContainer(command.toArray(new String[0]));
+ var execResult = rabbitMQ.execInContainer(command.toArray(new String[0]));
+ if (execResult.getExitCode() != 0) {
+ throw new IllegalStateException(
+ "Failed to enable RabbitMQ plugins " + properties.getEnabledPlugins()
+ + ". exitCode=" + execResult.getExitCode()
+ + ", stderr=" + execResult.getStderr());
+ }
}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@embedded-rabbitmq/src/main/java/com/playtika/testcontainer/rabbitmq/EmbeddedRabbitMQBootstrapConfiguration.java`
around lines 79 - 85, The plugin enable step currently ignores
rabbitMQ.execInContainer(...) return value; change it to capture the ExecResult
(from rabbitMQ.execInContainer), call getExitCode() and if non-zero log the
stdout/stderr (getStdout()/getStderr()) and fail fast (throw an
IllegalStateException) so failed "rabbitmq-plugins enable" calls are detected;
update the block that uses properties.getEnabledPlugins() to use the ExecResult
variable and validate getExitCode() before continuing.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
embedded-opensearch/src/test/java/com/playtika/testcontainer/opensearch/EmbeddedOpenSearchBootstrapConfigurationTest.java (1)
63-64: Extract duplicated insecure TLS manager construction.Line 63 and Line 73 duplicate the same setup; a small helper would keep both callbacks in sync.
♻️ Proposed refactor
`@Override` public void customize(RestClientBuilder builder) { builder.setHttpClientConfigCallback( httpClientBuilder -> { if (properties.isAllowInsecure()) { - httpClientBuilder.setConnectionManager(new PoolingAsyncClientConnectionManager(RegistryBuilder.<TlsStrategy>create().register(URIScheme.HTTPS.getId(),new DefaultClientTlsStrategy(sslcontext())).build())); + httpClientBuilder.setConnectionManager(insecureConnectionManager()); } return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider()); } ); } `@Override` public void customize(HttpAsyncClientBuilder builder) { if (properties.isAllowInsecure()) { - builder.setConnectionManager(new PoolingAsyncClientConnectionManager(RegistryBuilder.<TlsStrategy>create().register(URIScheme.HTTPS.getId(),new DefaultClientTlsStrategy(sslcontext())).build())); + builder.setConnectionManager(insecureConnectionManager()); } builder.setDefaultCredentialsProvider(credentialsProvider()); } + + private PoolingAsyncClientConnectionManager insecureConnectionManager() { + return new PoolingAsyncClientConnectionManager( + RegistryBuilder.<TlsStrategy>create() + .register(URIScheme.HTTPS.getId(), new DefaultClientTlsStrategy(sslcontext())) + .build() + ); + }Also applies to: 72-74
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@embedded-opensearch/src/test/java/com/playtika/testcontainer/opensearch/EmbeddedOpenSearchBootstrapConfigurationTest.java` around lines 63 - 64, Duplicate construction of the insecure TLS connection manager (the PoolingAsyncClientConnectionManager with DefaultClientTlsStrategy(sslcontext())) is repeated around the httpClientBuilder.setConnectionManager call; extract that logic into a single private helper method (e.g., createInsecureTlsConnectionManager or buildInsecureTlsManager) and replace both inline constructions with calls to that helper so both callbacks use the same implementation; reference the existing symbols httpClientBuilder.setConnectionManager, PoolingAsyncClientConnectionManager, DefaultClientTlsStrategy, and sslcontext() when implementing the helper.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@embedded-opensearch/src/test/java/com/playtika/testcontainer/opensearch/EmbeddedOpenSearchBootstrapConfigurationTest.java`:
- Around line 63-64: Duplicate construction of the insecure TLS connection
manager (the PoolingAsyncClientConnectionManager with
DefaultClientTlsStrategy(sslcontext())) is repeated around the
httpClientBuilder.setConnectionManager call; extract that logic into a single
private helper method (e.g., createInsecureTlsConnectionManager or
buildInsecureTlsManager) and replace both inline constructions with calls to
that helper so both callbacks use the same implementation; reference the
existing symbols httpClientBuilder.setConnectionManager,
PoolingAsyncClientConnectionManager, DefaultClientTlsStrategy, and sslcontext()
when implementing the helper.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 2ba19d25-3020-491e-bb1b-6d1d20dc29ab
📒 Files selected for processing (123)
README.adocembedded-aerospike/src/main/java/com/playtika/testcontainer/aerospike/EmbeddedAerospikeBootstrapConfiguration.javaembedded-artifactory/pom.xmlembedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.javaembedded-azurite/src/main/java/com/playtika/testcontainer/azurite/EmbeddedAzuriteBootstrapConfiguration.javaembedded-cassandra/pom.xmlembedded-cassandra/src/main/java/com/playtika/testcontainer/cassandra/EmbeddedCassandraBootstrapConfiguration.javaembedded-clickhouse/README.adocembedded-clickhouse/pom.xmlembedded-clickhouse/src/main/java/com/playtika/testcontainer/clickhouse/ClickHouseProperties.javaembedded-clickhouse/src/main/java/com/playtika/testcontainer/clickhouse/EmbeddedClickHouseBootstrapConfiguration.javaembedded-clickhouse/src/main/java/com/playtika/testcontainer/clickhouse/EmbeddedClickHouseDependenciesAutoConfiguration.javaembedded-clickhouse/src/test/resources/application-enabled.propertiesembedded-cockroachdb/pom.xmlembedded-cockroachdb/src/main/java/com/playtika/testcontainer/cockroach/EmbeddedCockroachDBBootstrapConfiguration.javaembedded-consul/pom.xmlembedded-consul/src/main/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfiguration.javaembedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationBaseTest.javaembedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationConfigTest.javaembedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationTest.javaembedded-couchbase/pom.xmlembedded-couchbase/src/main/java/com/playtika/testcontainer/couchbase/EmbeddedCouchbaseBootstrapConfiguration.javaembedded-db2/pom.xmlembedded-db2/src/main/java/com/playtika/testcontainer/db2/EmbeddedDb2BootstrapConfiguration.javaembedded-dynamodb/pom.xmlembedded-dynamodb/src/main/java/com/playtika/testcontainer/dynamodb/EmbeddedDynamoDBBootstrapConfiguration.javaembedded-dynamodb/src/main/java/com/playtika/testcontainer/dynamodb/EmbeddedDynamoDBDependenciesAutoConfiguration.javaembedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/EmbeddedDynamoDBBootstrapConfigurationTest.javaembedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/springdata/DynamoDBConfig.javaembedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/springdata/User.javaembedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/springdata/UserRepository.javaembedded-dynamodb/src/test/resources/application-enabled.propertiesembedded-elasticsearch/pom.xmlembedded-elasticsearch/src/main/java/com/playtika/testcontainer/elasticsearch/EmbeddedElasticSearchBootstrapConfiguration.javaembedded-elasticsearch/src/main/java/com/playtika/testcontainer/elasticsearch/EmbeddedElasticSearchRestClientDependenciesAutoConfiguration.javaembedded-elasticsearch/src/test/java/com/playtika/testcontainer/elasticsearch/springdata/SpringDataTest.javaembedded-git/src/main/java/com/playtika/testcontainer/git/EmbeddedGitBootstrapConfiguration.javaembedded-git/src/test/java/EmbeddedGitBootstrapConfigurationTest.javaembedded-git/src/test/java/util/EncryptionUtils.javaembedded-google-pubsub/pom.xmlembedded-google-pubsub/src/main/java/com/playtika/testcontainer/pubsub/EmbeddedPubsubBootstrapConfiguration.javaembedded-google-storage/pom.xmlembedded-google-storage/src/main/java/com/playtika/testcontainer/storage/EmbeddedStorageBootstrapConfiguration.javaembedded-grafana/pom.xmlembedded-grafana/src/main/java/com/playtika/testcontainer/grafana/EmbeddedGrafanaBootstrapConfiguration.javaembedded-influxdb/pom.xmlembedded-influxdb/src/main/java/com/playtika/testcontainer/influxdb/EmbeddedInfluxDBBootstrapConfiguration.javaembedded-k3s/pom.xmlembedded-kafka/pom.xmlembedded-kafka/src/main/java/com/playtika/testcontainer/kafka/configuration/KafkaContainerConfiguration.javaembedded-kafka/src/test/java/com/playtika/testcontainer/kafka/EmbeddedSchemaRegistryAuthTest.javaembedded-kafka/src/test/java/com/playtika/testcontainer/kafka/EmbeddedSchemaRegistryTest.javaembedded-keycloak/pom.xmlembedded-keycloak/src/main/java/com/playtika/testcontainer/keycloak/EmbeddedKeycloakBootstrapConfiguration.javaembedded-keydb/pom.xmlembedded-keydb/src/main/java/com/playtika/testcontainer/keydb/EmbeddedKeyDbBootstrapConfiguration.javaembedded-localstack/pom.xmlembedded-localstack/src/main/java/com/playtika/testcontainer/localstack/EmbeddedLocalStackBootstrapConfiguration.javaembedded-mailhog/src/main/java/com/playtika/testcontainer/mailhog/EmbeddedMailHogBootstrapConfiguration.javaembedded-mariadb/pom.xmlembedded-mariadb/src/main/java/com/playtika/testcontainer/mariadb/EmbeddedMariaDBBootstrapConfiguration.javaembedded-memsql/pom.xmlembedded-memsql/src/main/java/com/playtika/testcontainer/memsql/EmbeddedMemSqlBootstrapConfiguration.javaembedded-minio/pom.xmlembedded-minio/src/main/java/com/playtika/testcontainer/minio/EmbeddedMinioBootstrapConfiguration.javaembedded-mockserver/pom.xmlembedded-mongodb/README.adocembedded-mongodb/pom.xmlembedded-mongodb/src/main/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapConfiguration.javaembedded-mongodb/src/test/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapAuthConfigurationTest.javaembedded-mongodb/src/test/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapConfigurationTest.javaembedded-mongodb/src/test/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapReplicaSetConfigurationTest.javaembedded-mssqlserver/pom.xmlembedded-mssqlserver/src/main/java/com/playtika/testcontainer/mssqlserver/EmbeddedMSSQLServerBootstrapConfiguration.javaembedded-mssqlserver/src/main/java/com/playtika/testcontainer/mssqlserver/EmbeddedMSSQLServerContainer.javaembedded-mssqlserver/src/test/java/com/playtika/testcontainer/mssqlserver/EmbeddedMSSQLServerDependenciesAutoConfigurationTest.javaembedded-mysql/pom.xmlembedded-mysql/src/main/java/com/playtika/testcontainer/mysql/EmbeddedMySQLBootstrapConfiguration.javaembedded-mysql/src/main/java/com/playtika/testcontainer/mysql/EmbeddedMySQLTestOperationsAutoConfiguration.javaembedded-native-kafka/pom.xmlembedded-nats/pom.xmlembedded-nats/src/main/java/com/playtika/testcontainer/nats/EmbeddedNatsBootstrapConfiguration.javaembedded-neo4j/pom.xmlembedded-neo4j/src/main/java/com/playtika/testcontainer/neo4j/EmbeddedNeo4jBootstrapConfiguration.javaembedded-neo4j/src/main/java/com/playtika/testcontainer/neo4j/EmbeddedNeo4jDependenciesAutoConfiguration.javaembedded-opensearch/pom.xmlembedded-opensearch/src/main/java/com/playtika/testcontainer/opensearch/EmbeddedOpenSearchBootstrapConfiguration.javaembedded-opensearch/src/main/java/com/playtika/testcontainer/opensearch/OpenSearchContainerFactory.javaembedded-opensearch/src/test/java/com/playtika/testcontainer/opensearch/EmbeddedOpenSearchBootstrapConfigurationTest.javaembedded-oracle-xe/pom.xmlembedded-oracle-xe/src/main/java/com/playtika/testcontainer/oracle/EmbeddedOracleBootstrapConfiguration.javaembedded-postgresql/pom.xmlembedded-postgresql/src/main/java/com/playtika/testcontainer/postgresql/EmbeddedPostgreSQLBootstrapConfiguration.javaembedded-prometheus/pom.xmlembedded-prometheus/src/main/java/com/playtika/testcontainer/prometheus/EmbeddedPrometheusBootstrapConfiguration.javaembedded-pulsar/pom.xmlembedded-pulsar/src/main/java/com/playtika/testcontainer/pulsar/EmbeddedPulsarBootstrapConfiguration.javaembedded-pulsar/src/test/java/com/playtika/testcontainer/pulsar/EmbeddedPulsarBootstrapConfigurationTest.javaembedded-pulsar/src/test/java/com/playtika/testcontainer/pulsar/EmbeddedPulsarHttpServiceTest.javaembedded-rabbitmq/pom.xmlembedded-rabbitmq/src/main/java/com/playtika/testcontainer/rabbitmq/EmbeddedRabbitMQBootstrapConfiguration.javaembedded-rabbitmq/src/main/java/com/playtika/testcontainer/rabbitmq/EmbeddedRabbitMQDependenciesAutoConfiguration.javaembedded-redis/pom.xmlembedded-redis/src/main/java/com/playtika/testcontainer/redis/EmbeddedRedisBootstrapConfiguration.javaembedded-selenium/pom.xmlembedded-solr/pom.xmlembedded-solr/src/main/java/com/playtika/testcontainer/solr/EmbeddedSolrBootstrapConfiguration.javaembedded-solr/src/test/java/com/playtika/testcontainer/solr/BaseSolrTest.javaembedded-spicedb/src/main/java/com/playtika/testcontainer/spicedb/EmbeddedSpiceDBBootstrapConfiguration.javaembedded-toxiproxy/pom.xmlembedded-toxiproxy/src/main/java/com/playtika/testcontainer/toxiproxy/EmbeddedToxiProxyBootstrapConfiguration.javaembedded-toxiproxy/src/main/java/com/playtika/testcontainer/toxiproxy/ToxiproxyHelper.javaembedded-toxiproxy/src/test/java/com/playtika/testcontainer/toxiproxy/EmbeddedToxiProxyBootstrapConfigurationTest.javaembedded-vault/pom.xmlembedded-vault/src/main/java/com/playtika/testcontainer/vault/EmbeddedVaultBootstrapConfiguration.javaembedded-vertica/pom.xmlembedded-vertica/src/main/java/com/playtika/testcontainer/vertica/EmbeddedVerticaBootstrapConfiguration.javaembedded-victoriametrics/pom.xmlembedded-victoriametrics/src/main/java/com/playtika/testcontainer/victoriametrics/EmbeddedVictoriaMetricsBootstrapConfiguration.javaembedded-wiremock/pom.xmlpom.xmltestcontainers-common/src/test/java/com/playtika/testcontainer/common/spring/DockerPresenceMarkerTest.javatestcontainers-spring-boot-parent/pom.xml
💤 Files with no reviewable changes (8)
- embedded-google-storage/pom.xml
- embedded-google-pubsub/pom.xml
- embedded-victoriametrics/pom.xml
- embedded-artifactory/pom.xml
- pom.xml
- embedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/springdata/UserRepository.java
- embedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/springdata/DynamoDBConfig.java
- embedded-prometheus/pom.xml
✅ Files skipped from review due to trivial changes (69)
- README.adoc
- embedded-minio/pom.xml
- embedded-localstack/src/main/java/com/playtika/testcontainer/localstack/EmbeddedLocalStackBootstrapConfiguration.java
- embedded-aerospike/src/main/java/com/playtika/testcontainer/aerospike/EmbeddedAerospikeBootstrapConfiguration.java
- embedded-artifactory/src/main/java/com/playtika/testcontainer/artifactory/EmbeddedArtifactoryBootstrapConfiguration.java
- embedded-postgresql/src/main/java/com/playtika/testcontainer/postgresql/EmbeddedPostgreSQLBootstrapConfiguration.java
- embedded-kafka/src/main/java/com/playtika/testcontainer/kafka/configuration/KafkaContainerConfiguration.java
- embedded-elasticsearch/src/main/java/com/playtika/testcontainer/elasticsearch/EmbeddedElasticSearchBootstrapConfiguration.java
- embedded-git/src/test/java/EmbeddedGitBootstrapConfigurationTest.java
- embedded-mysql/src/main/java/com/playtika/testcontainer/mysql/EmbeddedMySQLTestOperationsAutoConfiguration.java
- embedded-clickhouse/src/main/java/com/playtika/testcontainer/clickhouse/EmbeddedClickHouseDependenciesAutoConfiguration.java
- embedded-oracle-xe/src/main/java/com/playtika/testcontainer/oracle/EmbeddedOracleBootstrapConfiguration.java
- embedded-selenium/pom.xml
- embedded-mariadb/pom.xml
- embedded-spicedb/src/main/java/com/playtika/testcontainer/spicedb/EmbeddedSpiceDBBootstrapConfiguration.java
- embedded-vertica/pom.xml
- embedded-memsql/src/main/java/com/playtika/testcontainer/memsql/EmbeddedMemSqlBootstrapConfiguration.java
- embedded-clickhouse/README.adoc
- embedded-victoriametrics/src/main/java/com/playtika/testcontainer/victoriametrics/EmbeddedVictoriaMetricsBootstrapConfiguration.java
- embedded-elasticsearch/src/test/java/com/playtika/testcontainer/elasticsearch/springdata/SpringDataTest.java
- embedded-vertica/src/main/java/com/playtika/testcontainer/vertica/EmbeddedVerticaBootstrapConfiguration.java
- testcontainers-common/src/test/java/com/playtika/testcontainer/common/spring/DockerPresenceMarkerTest.java
- embedded-nats/src/main/java/com/playtika/testcontainer/nats/EmbeddedNatsBootstrapConfiguration.java
- embedded-rabbitmq/src/main/java/com/playtika/testcontainer/rabbitmq/EmbeddedRabbitMQDependenciesAutoConfiguration.java
- embedded-toxiproxy/src/main/java/com/playtika/testcontainer/toxiproxy/ToxiproxyHelper.java
- embedded-kafka/src/test/java/com/playtika/testcontainer/kafka/EmbeddedSchemaRegistryAuthTest.java
- embedded-elasticsearch/src/main/java/com/playtika/testcontainer/elasticsearch/EmbeddedElasticSearchRestClientDependenciesAutoConfiguration.java
- embedded-elasticsearch/pom.xml
- embedded-keydb/pom.xml
- embedded-dynamodb/src/main/java/com/playtika/testcontainer/dynamodb/EmbeddedDynamoDBBootstrapConfiguration.java
- embedded-vault/src/main/java/com/playtika/testcontainer/vault/EmbeddedVaultBootstrapConfiguration.java
- embedded-native-kafka/pom.xml
- embedded-pulsar/src/test/java/com/playtika/testcontainer/pulsar/EmbeddedPulsarHttpServiceTest.java
- embedded-oracle-xe/pom.xml
- embedded-opensearch/pom.xml
- embedded-redis/src/main/java/com/playtika/testcontainer/redis/EmbeddedRedisBootstrapConfiguration.java
- embedded-mongodb/src/test/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapReplicaSetConfigurationTest.java
- embedded-cockroachdb/pom.xml
- embedded-nats/pom.xml
- embedded-kafka/pom.xml
- embedded-toxiproxy/pom.xml
- embedded-keycloak/src/main/java/com/playtika/testcontainer/keycloak/EmbeddedKeycloakBootstrapConfiguration.java
- embedded-couchbase/pom.xml
- embedded-clickhouse/src/main/java/com/playtika/testcontainer/clickhouse/ClickHouseProperties.java
- embedded-rabbitmq/pom.xml
- embedded-solr/pom.xml
- embedded-kafka/src/test/java/com/playtika/testcontainer/kafka/EmbeddedSchemaRegistryTest.java
- embedded-redis/pom.xml
- embedded-clickhouse/pom.xml
- embedded-neo4j/src/main/java/com/playtika/testcontainer/neo4j/EmbeddedNeo4jDependenciesAutoConfiguration.java
- embedded-wiremock/pom.xml
- embedded-opensearch/src/main/java/com/playtika/testcontainer/opensearch/OpenSearchContainerFactory.java
- embedded-git/src/test/java/util/EncryptionUtils.java
- embedded-toxiproxy/src/test/java/com/playtika/testcontainer/toxiproxy/EmbeddedToxiProxyBootstrapConfigurationTest.java
- embedded-mysql/src/main/java/com/playtika/testcontainer/mysql/EmbeddedMySQLBootstrapConfiguration.java
- embedded-vault/pom.xml
- embedded-clickhouse/src/test/resources/application-enabled.properties
- embedded-neo4j/src/main/java/com/playtika/testcontainer/neo4j/EmbeddedNeo4jBootstrapConfiguration.java
- embedded-mssqlserver/pom.xml
- embedded-mongodb/README.adoc
- embedded-cockroachdb/src/main/java/com/playtika/testcontainer/cockroach/EmbeddedCockroachDBBootstrapConfiguration.java
- embedded-google-storage/src/main/java/com/playtika/testcontainer/storage/EmbeddedStorageBootstrapConfiguration.java
- embedded-clickhouse/src/main/java/com/playtika/testcontainer/clickhouse/EmbeddedClickHouseBootstrapConfiguration.java
- embedded-influxdb/src/main/java/com/playtika/testcontainer/influxdb/EmbeddedInfluxDBBootstrapConfiguration.java
- embedded-postgresql/pom.xml
- embedded-grafana/src/main/java/com/playtika/testcontainer/grafana/EmbeddedGrafanaBootstrapConfiguration.java
- embedded-cassandra/pom.xml
- embedded-mailhog/src/main/java/com/playtika/testcontainer/mailhog/EmbeddedMailHogBootstrapConfiguration.java
- embedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationTest.java
🚧 Files skipped from review as they are similar to previous changes (39)
- embedded-memsql/pom.xml
- embedded-google-pubsub/src/main/java/com/playtika/testcontainer/pubsub/EmbeddedPubsubBootstrapConfiguration.java
- embedded-mongodb/src/test/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapConfigurationTest.java
- embedded-keycloak/pom.xml
- embedded-mongodb/pom.xml
- embedded-mockserver/pom.xml
- embedded-k3s/pom.xml
- embedded-dynamodb/src/test/resources/application-enabled.properties
- embedded-mssqlserver/src/test/java/com/playtika/testcontainer/mssqlserver/EmbeddedMSSQLServerDependenciesAutoConfigurationTest.java
- embedded-db2/pom.xml
- embedded-neo4j/pom.xml
- embedded-pulsar/src/test/java/com/playtika/testcontainer/pulsar/EmbeddedPulsarBootstrapConfigurationTest.java
- embedded-influxdb/pom.xml
- embedded-prometheus/src/main/java/com/playtika/testcontainer/prometheus/EmbeddedPrometheusBootstrapConfiguration.java
- embedded-mongodb/src/test/java/com/playtika/testcontainer/mongodb/EmbeddedMongodbBootstrapAuthConfigurationTest.java
- embedded-couchbase/src/main/java/com/playtika/testcontainer/couchbase/EmbeddedCouchbaseBootstrapConfiguration.java
- embedded-grafana/pom.xml
- embedded-keydb/src/main/java/com/playtika/testcontainer/keydb/EmbeddedKeyDbBootstrapConfiguration.java
- embedded-dynamodb/src/main/java/com/playtika/testcontainer/dynamodb/EmbeddedDynamoDBDependenciesAutoConfiguration.java
- embedded-localstack/pom.xml
- embedded-solr/src/test/java/com/playtika/testcontainer/solr/BaseSolrTest.java
- embedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationBaseTest.java
- embedded-git/src/main/java/com/playtika/testcontainer/git/EmbeddedGitBootstrapConfiguration.java
- embedded-pulsar/pom.xml
- embedded-toxiproxy/src/main/java/com/playtika/testcontainer/toxiproxy/EmbeddedToxiProxyBootstrapConfiguration.java
- embedded-dynamodb/pom.xml
- embedded-mssqlserver/src/main/java/com/playtika/testcontainer/mssqlserver/EmbeddedMSSQLServerContainer.java
- embedded-mysql/pom.xml
- embedded-mariadb/src/main/java/com/playtika/testcontainer/mariadb/EmbeddedMariaDBBootstrapConfiguration.java
- embedded-minio/src/main/java/com/playtika/testcontainer/minio/EmbeddedMinioBootstrapConfiguration.java
- embedded-solr/src/main/java/com/playtika/testcontainer/solr/EmbeddedSolrBootstrapConfiguration.java
- embedded-db2/src/main/java/com/playtika/testcontainer/db2/EmbeddedDb2BootstrapConfiguration.java
- embedded-rabbitmq/src/main/java/com/playtika/testcontainer/rabbitmq/EmbeddedRabbitMQBootstrapConfiguration.java
- embedded-pulsar/src/main/java/com/playtika/testcontainer/pulsar/EmbeddedPulsarBootstrapConfiguration.java
- embedded-dynamodb/src/test/java/com/playtika/testcontainer/dynamodb/springdata/User.java
- embedded-cassandra/src/main/java/com/playtika/testcontainer/cassandra/EmbeddedCassandraBootstrapConfiguration.java
- embedded-consul/pom.xml
- embedded-consul/src/test/java/com/playtika/testcontainer/consul/EmbeddedConsulBootstrapConfigurationConfigTest.java
- testcontainers-spring-boot-parent/pom.xml
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2879 +/- ##
==========================================
Coverage 82.45% 82.45%
+ Complexity 694 693 -1
==========================================
Files 205 205
Lines 3135 3135
Branches 146 146
==========================================
Hits 2585 2585
- Misses 481 482 +1
+ Partials 69 68 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
994a160 to
4755060
Compare
ijusti
left a comment
There was a problem hiding this comment.
We will release it on May 4
| // Please don`t remove this comment. | ||
| // renovate: datasource=docker | ||
| return "ibmcom/db2:11.5.8.0"; | ||
| return "icr.io/db2_community/db2:latest"; |
There was a problem hiding this comment.
Please use the exact version instead of the latest
3deca2a to
432d644
Compare
|
@m1ngyuan please address failing tests. |
Summary by CodeRabbit
New Features
Dependency Updates
Bug Fixes & Improvements
Documentation