Polish "Upgrade to Testcontainers 1.20.2"

This commit review the original upgrade to retain compatiblity with the
deprecated Cassandra and ConfluentKafka containers.

This commit also fixes the SSL Cassandra tests. The new container uses
a custom wait strategy that uses plain text and does not work with an
SSL container.

Closes gh-42670

Co-authored-by: Moritz Halbritter <moritz.halbritter@broadcom.com>
This commit is contained in:
Stéphane Nicoll
2024-10-15 13:36:47 +02:00
parent a7fb3699ee
commit e0152097f3
7 changed files with 336 additions and 0 deletions

View File

@@ -83,6 +83,16 @@ public enum TestImage {
CASSANDRA("cassandra", "3.11.10", () -> CassandraContainer.class,
(container) -> ((CassandraContainer) container).withStartupTimeout(Duration.ofMinutes(10))),
/**
* A container image suitable for testing Cassandra using the deprecated
* {@link org.testcontainers.containers.CassandraContainer}.
* @deprecated since 3.4.0 for removal in 3.6.0 in favor of {@link #CASSANDRA}
*/
@Deprecated(since = "3.4.0", forRemoval = true)
CASSANDRA_DEPRECATED("cassandra", "3.11.10", () -> org.testcontainers.containers.CassandraContainer.class,
(container) -> ((org.testcontainers.containers.CassandraContainer<?>) container)
.withStartupTimeout(Duration.ofMinutes(10))),
/**
* A container image suitable for testing Couchbase.
*/
@@ -119,6 +129,15 @@ public enum TestImage {
*/
CONFLUENT_KAFKA("confluentinc/cp-kafka", "7.4.0", () -> ConfluentKafkaContainer.class),
/**
* A container image suitable for testing Confluent's distribution of Kafka using the
* deprecated {@link org.testcontainers.containers.KafkaContainer}.
* @deprecated since 3.4.0 for removal in 3.6.0 in favor of {@link #CONFLUENT_KAFKA}
*/
@Deprecated(since = "3.4.0", forRemoval = true)
CONFLUENT_KAFKA_DEPRECATED("confluentinc/cp-kafka", "7.4.0",
() -> org.testcontainers.containers.KafkaContainer.class),
/**
* A container image suitable for testing OpenLDAP.
*/