From 2311f1a36735bead617fb1ff27526ae32db99ff4 Mon Sep 17 00:00:00 2001 From: Tatsuo Ishii Date: Thu, 5 Sep 2019 13:40:02 +0900 Subject: [PATCH] Fix regression test 028.watchdog_enable_consensus_with_half_of_the_votes to not fail. It seems pcp_watchdog_info fails because: ERROR: connection to socket "/tmp/.s.PGSQL.50001" failed with error "No such file or directory" Fix could be trying to wait for pcp_watchdog_info available. See if this fixes the issue. --- .../test.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/test/regression/tests/028.watchdog_enable_consensus_with_half_of_the_votes/test.sh b/src/test/regression/tests/028.watchdog_enable_consensus_with_half_of_the_votes/test.sh index ba033bb95..28b25b16a 100755 --- a/src/test/regression/tests/028.watchdog_enable_consensus_with_half_of_the_votes/test.sh +++ b/src/test/regression/tests/028.watchdog_enable_consensus_with_half_of_the_votes/test.sh @@ -34,6 +34,20 @@ function wait_for_watchdog_startup # retun 0 if quorum exists. function quorum_exists { + $PGPOOL_INSTALL_DIR/bin/pcp_watchdog_info -v -w -p $PCP_PORT >/dev/null 2>&1 + if [ $? != 0 ];then + echo "pcp_watchdog_info is not still available" + for i in 1 2 3 4 5 + do + $PGPOOL_INSTALL_DIR/bin/pcp_watchdog_info -v -w -p $PCP_PORT >/dev/null 2>&1 + if [ $? = 0 ];then + break; + fi + echo "waiting for pcp_watchdog_info becomes available" + sleep 1 + done + fi + $PGPOOL_INSTALL_DIR/bin/pcp_watchdog_info -v -w -p $PCP_PORT |grep QUORUM|egrep 'EXIST|EDGE'>/dev/null } -- 2.39.5