Fix 033.prefer_lower_standbu_delay
authorMasaya Kawamoto <kawamoto@sraoss.co.jp>
Mon, 12 Jul 2021 04:52:40 +0000 (04:52 +0000)
committerMasaya Kawamoto <kawamoto@sraoss.co.jp>
Mon, 12 Jul 2021 04:52:40 +0000 (04:52 +0000)
Sometimes this test failed due to the waiting time after pcp_reload_conf
was short. I modified the script to confirm the change by PGPOOL SHOW
before running the test.

src/test/regression/tests/033.prefer_lower_standby_delay/test.sh

index 5b436d7ebcb8d4900b838b6f5ac4ce159e688618..fe0d21c56f243209969255743b12b27e79be1454 100755 (executable)
@@ -76,7 +76,14 @@ EOF
 
        $PGPOOL_INSTALL_DIR/bin/pcp_reload_config -w -h localhost -p $PCP_PORT
 
-       wait_for_pgpool_startup
+       while :
+       do
+               $PSQL test -c "PGPOOL SHOW prefer_lower_delay_standby" |grep off
+               if [ $? = 0 ]; then
+                       break
+               fi
+               sleep 1
+       done
 
        $PSQL -p 11003 test -c "$REPLAY_PAUSE"