Skip to content

tests: postgres: try createdb multiple times - #329

Merged
osmith42 merged 2 commits into
nickvsnetworking:masterfrom
osmith42:postgres-createdb
Aug 12, 2026
Merged

tests: postgres: try createdb multiple times#329
osmith42 merged 2 commits into
nickvsnetworking:masterfrom
osmith42:postgres-createdb

Conversation

@osmith42

Copy link
Copy Markdown
Collaborator

I've seen the createdb command fail occasionally in github's CI.
Apparently postgres can be in a "starting up" state even after the tcp
port is bound:

  createdb: error: connection to server at "127.0.0.1", port 54321 failed: FATAL:  the database system is starting up

Make the tests pass reliably by running the createdb command up to 5
times with a 1s sleep between each attempt.

Related: https://github.com/nickvsnetworking/pyhss/actions/runs/31482527502/job/93750506691

I've seen the createdb command fail occasionally in github's CI.
Apparently postgres can be in a "starting up" state even after the tcp
port is bound:

  createdb: error: connection to server at "127.0.0.1", port 54321 failed: FATAL:  the database system is starting up

Make the tests pass reliably by running the createdb command up to 5
times with a 1s sleep between each attempt.

Related: https://github.com/nickvsnetworking/pyhss/actions/runs/31482527502/job/93750506691
@osmith42
osmith42 requested a review from Takuto88 August 11, 2026 11:14
@osmith42
osmith42 merged commit f8af6f2 into nickvsnetworking:master Aug 12, 2026
8 checks passed
@osmith42
osmith42 deleted the postgres-createdb branch August 12, 2026 06:21
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