Skip to content

Commit

Permalink
Set default check interval to 5 seconds for for 'stop'
Browse files Browse the repository at this point in the history
  • Loading branch information
eradman committed May 21, 2019
1 parent c73ff40 commit 5ae55d1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- '-w 0' leaves the server running indefinitely
- New '-k' flag prevents the temporary directory from being cleaned up
- Only repeat the last 10 lines of the postgres log if createdb(1) fails
- Set default check interval to 5 seconds for for 'stop'

= Release History

Expand Down
2 changes: 1 addition & 1 deletion pg_tmp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ stop)
export PGHOST PGPORT
q="SELECT count(*) FROM pg_stat_activity WHERE datname='test';"
until [ "${count:-2}" -lt "2" ]; do
sleep ${TIMEOUT:-0}
sleep ${TIMEOUT:-5}
count=$(psql test --no-psqlrc -At -c "$q" || echo 0)
done
pg_ctl -W -D $TD/$PGVER stop
Expand Down
4 changes: 2 additions & 2 deletions test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def eq(a, b)
out, err, status = Open3.capture3({'SYSTMP'=>$systmp, 'PATH'=>$altpath}, cmd)
eq out.empty?, true
eq err, <<-eos
sleep 0
sleep 5
psql test --no-psqlrc -At -c SELECT count(*) FROM pg_stat_activity WHERE datname='test';
pg_ctl -W -D #{$systmp}/ephemeralpg.XXXXXX/11.2 stop
sleep 1
Expand Down Expand Up @@ -234,7 +234,7 @@ def eq(a, b)
out, err, status = Open3.capture3({'PATH'=>$altpath}, cmd)
eq out.empty?, true
eq err.gsub(/on line \d+/, 'on line 100'), <<-eos
sleep 0
sleep 5
pg_ctl -W -D #{$systmp}/ephemeralpg.XXXXXX/11.2 stop
sleep 1
rm -r #{$systmp}/ephemeralpg.XXXXXX
Expand Down

0 comments on commit 5ae55d1

Please sign in to comment.