Skip to content

Update PostgreSQLContainer.java#10177

Closed
zapp88 wants to merge 1 commit intotestcontainers:mainfrom
zapp88:main
Closed

Update PostgreSQLContainer.java#10177
zapp88 wants to merge 1 commit intotestcontainers:mainfrom
zapp88:main

Conversation

@zapp88
Copy link
Copy Markdown

@zapp88 zapp88 commented Apr 9, 2025

This a fix for bug #10176

Only wait for one appearance of log message
@zapp88
Copy link
Copy Markdown
Author

zapp88 commented Apr 9, 2025

Or, if the proposed bug fix is not acceptable, a more robust approach would be to change the waitStrategy to:

new ShellStrategy().withCommand("pg_isready -U postgres");

@zapp88 zapp88 marked this pull request as ready for review April 9, 2025 11:35
@zapp88 zapp88 requested a review from a team April 9, 2025 11:35
@eddumelendez
Copy link
Copy Markdown
Member

Thanks for your contribution, @zapp88.

  1. The suggested approach is not considering that empty database start the postgres service twice. See the link I left in the duplicated issue.
  2. The successful command is not reliable because of the restart of the engine, sooner or later will fail. We have explored that way too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants