From: Peter Eisentraut Date: Thu, 1 Aug 2019 12:02:21 +0000 (+0200) Subject: Tweak some test timing to make the tests more stable X-Git-Tag: pgbouncer_1_11_0~37 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=01766cd8cc2b1f3c86af5a2834b472b4a32fdc75;p=pgbouncer Tweak some test timing to make the tests more stable --- diff --git a/test/test.sh b/test/test.sh index 67f22fb..a61c9ed 100755 --- a/test/test.sh +++ b/test/test.sh @@ -457,6 +457,11 @@ test_database_restart() { wait psql -X -c "select now() as p0_after_restart" p0 || return 1 + + # connect to clear server_login_retry state + psql -X -c "select now() as p1_after_restart" p1 + + return 0 } # test connect string change @@ -521,7 +526,7 @@ test_fast_close() { test_wait_close() { ( echo "select pg_backend_pid();" - sleep 2 + sleep 3 echo "select pg_backend_pid();" echo "\q" ) | psql -X -tAq -f- -d p3 & @@ -529,9 +534,10 @@ test_wait_close() { sleep 1 admin "reconnect p3" admin "wait_close p3" + sleep 1 # give psql a moment to exit - # psql should no longer be running now. (Without the wait it - # would still be running.) + # psql should no longer be running now. (Without the + # wait_close it would still be running.) kill -0 $psql_pid psql_running=$?