From 510a1cbbb819c4812e0568f23a15db89fbfb28c8 Mon Sep 17 00:00:00 2001 From: Andre Kurait Date: Thu, 22 Oct 2026 22:26:43 -0500 Subject: [PATCH] test(rds): wait for the final PostgreSQL TCP listener (#6318) Avoid accepting the temporary Unix-socket initialization server as ready before the endpoint refresh tests connect over TCP. Remove test-owned anonymous volumes with their containers. Signed-off-by: Andre Kurait --- .../rdsdata/RdsBackendEndpointRefreshIntegrationTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/java/io/github/hectorvent/floci/services/rdsdata/RdsBackendEndpointRefreshIntegrationTest.java b/src/test/java/io/github/hectorvent/floci/services/rdsdata/RdsBackendEndpointRefreshIntegrationTest.java index 61be37b9fc..a38f1d0d1e 100644 --- a/src/test/java/io/github/hectorvent/floci/services/rdsdata/RdsBackendEndpointRefreshIntegrationTest.java +++ b/src/test/java/io/github/hectorvent/floci/services/rdsdata/RdsBackendEndpointRefreshIntegrationTest.java @@ -323,7 +323,8 @@ class RdsBackendEndpointRefreshIntegrationTest { } private void waitForPostgres(String containerId) { - String[] command = {"pg_isready", "-U", USER, "-d", DATABASE}; + // The image's temporary initialization server accepts only Unix-socket connections. + String[] command = {"pg_isready", "-h", "127.0.0.1", "-U", USER, "-d", DATABASE}; ContainerExec.Result lastResult = null; for (int attempt = 0; attempt < 60; attempt++) { lastResult = ContainerExec.run(dockerClient, containerId, command, 5); @@ -372,7 +373,7 @@ class RdsBackendEndpointRefreshIntegrationTest { return; } try { - dockerClient.removeContainerCmd(containerId).withForce(true).exec(); + dockerClient.removeContainerCmd(containerId).withForce(true).withRemoveVolumes(true).exec(); } catch (DockerException ignored) { // best effort }