Fix occasional regression test 018.detach_primary error.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Fri, 28 May 2021 07:47:45 +0000 (16:47 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Fri, 28 May 2021 07:58:07 +0000 (16:58 +0900)
According to the buildfarm log, the test failed at after this:
with this:
$PGPOOL_INSTALL_DIR/bin/pcp_watchdog_info -v -w -p $PCP_PORT
error message was:
ERROR: connection to socket "/tmp/.s.PGSQL.50001" failed with error "No such file or directory"
This suggests that pcp_watchdog_info fails because pcp server has not started yet.

To fix this add wait_for_pgpool_startup before pcp_watchdog_info.

src/test/regression/tests/018.detach_primary/test.sh

index 82e01a4780e1a5913f491ddda6a5cd9215d010c4..2ded69150b95be377e62cbd1600e9a8e1c8c01ee 100755 (executable)
@@ -102,6 +102,9 @@ cd pgpool2
 ./startall
 cd ..
 sleep 10
+date
+wait_for_pgpool_startup
+date
 $PGPOOL_INSTALL_DIR/bin/pcp_watchdog_info -v -w -p $PCP_PORT
 
 $PSQL -c "show pool_nodes" postgres