Skip to content

Commit

Permalink
systemtests: verify that psql is not in recovery mode after start (an…
Browse files Browse the repository at this point in the history
…ymore)
  • Loading branch information
aussendorf committed May 27, 2020
1 parent d796423 commit 759b0ef
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -45,6 +45,15 @@ local_db_start_server() {
sleep 0.1
done

tries=10
while ! echo "select pg_is_in_recovery()" | psql --host="$1" postgres | grep -q -e "^ f$" ; do
[ $((tries-=1)) -eq 0 ] && {
echo "Could not start postgres server (still recovering)"
return 1
}
sleep 0.1
done

return 0
}

Expand Down

0 comments on commit 759b0ef

Please sign in to comment.