Make shutdownall to wait for completion of shutdown of Pgpool-II.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Tue, 2 Jul 2019 09:40:11 +0000 (18:40 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Tue, 2 Jul 2019 09:53:37 +0000 (18:53 +0900)
It was observed that regression test occasionally failed because
previous does not completely finished before next test started. To fix
the problem, make shutdownall script generated by pgpool_setup to wait
for completion of shutdown of Pgpool-II.

src/test/pgpool_setup

index b67476e4292e5d2e3595e5ce4547d91de5b4f186..70dcd7fccf4d4327ebf2e5b837031dd70759782e 100755 (executable)
@@ -718,6 +718,7 @@ chmod 755 $STARTALL
 echo 'dir=`pwd`' > $SHUTDOWNALL
 echo "PGPOOL_INSTALL_DIR=$PGPOOL_INSTALL_DIR" >> $SHUTDOWNALL
 echo '$PGPOOL_INSTALL_DIR/bin/pgpool -f $dir/etc/pgpool.conf -m f stop' >> $SHUTDOWNALL
+echo 'while [ -f $dir/run/pgpool.pid ];do sleep 1;done' >> $SHUTDOWNALL
 chmod 755 $SHUTDOWNALL
 echo 'dir=`pwd`' > $PGPOOL_RELOAD
 echo "PGPOOL_INSTALL_DIR=$PGPOOL_INSTALL_DIR" >> $PGPOOL_RELOAD