Fix regress test to sleep after pgpool_reload
authorYugo Nagata <nagata@sraoss.co.jp>
Wed, 19 Aug 2015 04:11:25 +0000 (13:11 +0900)
committerYugo Nagata <nagata@sraoss.co.jp>
Wed, 19 Aug 2015 07:38:32 +0000 (16:38 +0900)
commitdfb0c92d54f4e0d18cc7774aed2ac9c8a0661fc3
treee5cd44f76b13113b95bbb412fc752ad1a18ba4ed
parent760aa2c2f90768f10c4c7cdf9d9201e185bc3f70
Fix regress test to sleep after pgpool_reload

Some regression tests test behaviors after pgpool-II configuration
is modified and reloaded. However, sometimes these modification
were not applied to pgpool just after reloading.

It was observed after the following commit.

 commit ba24a708ed61d6a5fa296451b194c4b448ed5966
 Author: Tatsuo Ishii <ishii@postgresql.org>
 Date:   Thu Aug 6 13:02:42 2015 +0900

 Issue fsync() when writing pgpool_status.

 This ensures that pgpool_status is saved to permanent storage and
 allow to survive after system crash.

It seem to be because fsync() takes a time before SIGHUP is sent
to child processes in reload_config().

Fix is to add sleep to wait for applying modification after
pgpool_reload.

In addition, some messages are added to test for debugging.
src/test/regression/tests/001.load_balance/test.sh
src/test/regression/tests/008.dbredirect/test.sh
src/test/regression/tests/009.sql_comments/test.sh