From 649d1e8c5f843aed61fb322a0304cc85a01572c4 Mon Sep 17 00:00:00 2001 From: Marcus Fihlon Date: Thu, 30 Apr 2026 11:37:38 +0200 Subject: [PATCH] fix(testcontainers): align versions and stabilize PostGIS setup Unify Testcontainers dependencies to a consistent version and remove custom container tweaks that caused instability with Podman. - align all Testcontainers dependencies to 2.0.5 - remove `HostPortWaitStrategy` (PostgreSQLContainer already defines an appropriate wait strategy) - remove `withReuse(true)` (may retain state across runs and break reproducibility) Signed-off-by: Marcus Fihlon --- pom.xml | 9 ++++----- .../fitpub/config/TestcontainersConfiguration.java | 5 +---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 008ac47..8ecf1b2 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ UTF-8 17 0.12.3 - 2.0.3 + 2.0.5 @@ -170,15 +170,14 @@ org.testcontainers testcontainers-junit-jupiter - 2.0.2 + ${testcontainers.version} test - org.testcontainers testcontainers-postgresql - 2.0.1 + ${testcontainers.version} test @@ -193,4 +192,4 @@ - \ No newline at end of file + diff --git a/src/test/java/net/javahippie/fitpub/config/TestcontainersConfiguration.java b/src/test/java/net/javahippie/fitpub/config/TestcontainersConfiguration.java index 3053571..4819da6 100644 --- a/src/test/java/net/javahippie/fitpub/config/TestcontainersConfiguration.java +++ b/src/test/java/net/javahippie/fitpub/config/TestcontainersConfiguration.java @@ -4,7 +4,6 @@ import org.springframework.boot.test.context.TestConfiguration; import org.springframework.boot.testcontainers.service.connection.ServiceConnection; import org.springframework.context.annotation.Bean; import org.testcontainers.containers.PostgreSQLContainer; -import org.testcontainers.containers.wait.strategy.HostPortWaitStrategy; import org.testcontainers.utility.DockerImageName; /** @@ -23,8 +22,6 @@ public class TestcontainersConfiguration { ) .withDatabaseName("testdb") .withUsername("test") - .withPassword("test") - .waitingFor(new HostPortWaitStrategy()) - .withReuse(true); + .withPassword("test"); } }