Increase timeout for PostgreSQL in upgrade tests

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.
This commit is contained in:
Jan Nidzwetzki 2023-02-20 09:23:41 +01:00 committed by Jan Nidzwetzki
parent 0cbd7407a6
commit 7e43c702ba

View File

@ -139,7 +139,7 @@ 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
@ -147,7 +147,7 @@ wait_for_pg() {
# 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