pgpool2.git / summary / log / commit / refs

commit    d769a4f9cf06aabfa836a27698bb91cb70e92e57
Author:   Tatsuo Ishii <ishii@sraoss.co.jp>
Date:     Tue Dec 31 03:06:50 2019 +0000

    Fix occasional regression test 003.failover failure.
    
    The test compares the result of show pool_nodes against pre-computed
    expected text file. After primary node goes down and old standby
    promotes to primary, it is possible that streaming replication worker
    process stores the replication state (async, streaming) in shared
    memory before the failover but fails to update the state after the
    failover. Fix is, replace "async", "streaming" with space characters
    in the result file to match the expected file.


src/test/regression/tests/003.failover/test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/regression/tests/003.failover/test.sh b/src/test/regression/tests/003.failover/test.sh index 74a569eac..da0aebdb6 100755 --- a/src/test/regression/tests/003.failover/test.sh +++ b/src/test/regression/tests/003.failover/test.sh @@ -27,7 +27,8 @@ do # trigger failover on node 1 $PG_CTL -D data1 -m f stop wait_for_pgpool_startup - $PSQL -c "show pool_nodes" test |sed -e 's/true /false/' -e 's/....-..-.. ..:..:../XXXX-XX-XX XX:XX:XX/g'> result + $PSQL -c "show pool_nodes" test |sed -e 's/true /false/' -e 's/....-..-.. ..:..:../XXXX-XX-XX XX:XX:XX/g'| + sed -e 's/streaming/ /' | sed -e 's/async/ /'> result # check the output of "show pool_nodes". LANG=C $PSQL -f ../create_expected.sql -v mode="'$mode'" -v dir="'$PGSOCKET_DIR'" test | tail -n 6 > expected [parent: 2fc65c96d53b]