Skip to content

Commit

Permalink
Increase timeout for PostgreSQL in upgrade tests
Browse files Browse the repository at this point in the history
The upgrade and downgrade tests are running PostgreSQL in Docker
containers. The function 'wait_for_pg' is used to determine if
PostgreSQL is ready to accept connections. In contrast to the upgrade
tests, the downgrade tests use more relaxed timeout values. The upgrade
tests sometimes fail because PostgreSQL cannot accept connections within
the configured time range. This patch applies the more relaxed timeout
values also to the upgrade script.
  • Loading branch information
jnidzwetzki committed Feb 20, 2023
1 parent 0cbd740 commit 7e43c70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/test_update_from_tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ docker_run_vol() {
wait_for_pg() {
set +e
for _ in {1..20}; do
sleep 0.5
sleep 1

if docker_exec $1 "pg_isready -U postgres"
then
# this makes the test less flaky, although not
# ideal. Apperently, pg_isready is not always a good
# indication of whether the DB is actually ready to accept
# queries
sleep 0.2
sleep 1
set -e
return 0
fi
Expand Down

0 comments on commit 7e43c70

Please sign in to comment.