Skip to content

Conversation

@kant777
Copy link
Contributor

@kant777 kant777 commented Feb 10, 2026

Replace wait.ForListeningPort with wait.ForAll combining ForLog and ForListeningPort. PostgreSQL opens the TCP port before initialization completes, causing "connection reset by peer" errors. The log message appears twice (once during initdb, once after restart), so WithOccurrence(2) ensures full readiness before tests connect.

Replace wait.ForListeningPort with wait.ForAll combining ForLog and
ForListeningPort. PostgreSQL opens the TCP port before initialization
completes, causing "connection reset by peer" errors. The log message
appears twice (once during initdb, once after restart), so
WithOccurrence(2) ensures full readiness before tests connect.
@owen-eth owen-eth self-requested a review February 10, 2026 21:05
@kant777 kant777 merged commit 6c7a10b into main Feb 10, 2026
7 checks passed
@kant777 kant777 deleted the fix/postgres-testcontainer-wait-strategy branch February 10, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants