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

@@ -17,6 +17,7 @@
package smoketest.data.cassandra;
import org.testcontainers.cassandra.CassandraContainer;
import org.testcontainers.containers.wait.strategy.Wait;
import org.testcontainers.utility.DockerImageName;
import org.testcontainers.utility.MountableFile;
@@ -29,6 +30,7 @@ class SecureCassandraContainer extends CassandraContainer {
SecureCassandraContainer(DockerImageName dockerImageName) {
super(dockerImageName);
setWaitStrategy(Wait.defaultWaitStrategy()); // default strategy uses plain text
withCopyFileToContainer(MountableFile.forClasspathResource("/ssl/cassandra.yaml"),
"/etc/cassandra/cassandra.yaml");
withCopyFileToContainer(MountableFile.forClasspathResource("/ssl/test-server.p12"),