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 <AndreKurait@gmail.com>
This commit is contained in:
Andre Kurait authored and GitHub committed 2026-10-22 23:26:43 -04:00
1 parent 63d577a245
commit 510a1cbbb8
1 file changed
+3 -2
@@ -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
}