pgpool2.git / summary / log / commit / refs

commit    17dcf4fd6ba6c63433b4990e9ecb95b060a07b7f
Author:   Tatsuo Ishii <ishii@sraoss.co.jp>
Date:     Tue Aug 13 00:42:34 2019 +0000

    Fix test failure of extended-query-test/disable-load-balance-while-function.data.
    
    The test failed because CREATE function propagation to standby took a while.
    To fix this, add "SELECT pg_sleep(5)" to wait for standby synced with primary.
    Also expected file is updated to reflect this.
    2) CREATE function propagation to standby took a while


.../expected/disable-load-balance-white-function.data | 7 ++++++- .../extra_scripts/disable-load-balance-white-function.data | 2 +- .../tests/disable-load-balance-white-function.data | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/test/extended-query-test/expected/disable-load-balance-white-function.data b/src/test/extended-query-test/expected/disable-load-balance-white-function.data index 3924da9e2..9197d0dd6 100644 --- a/src/test/extended-query-test/expected/disable-load-balance-white-function.data +++ b/src/test/extended-query-test/expected/disable-load-balance-white-function.data @@ -1,10 +1,15 @@ FE=> Query (query="DROP FUNCTION IF EXISTS f1") -<= BE NoticeResponse(S NOTICE V NOTICE C 00000 M function f1() does not exist, skipping F dropcmds.c L 483 R does_not_exist_skipping ) +<= BE NoticeResponse(S NOTICE V NOTICE C 00000 M function f1() does not exist, skipping F dropcmds.c L 491 R does_not_exist_skipping ) <= BE CommandComplete(DROP FUNCTION) <= BE ReadyForQuery(I) FE=> Query (query="CREATE FUNCTION f1(INTEGER) returns INTEGER AS 'SELECT $1' LANGUAGE SQL") <= BE CommandComplete(CREATE FUNCTION) <= BE ReadyForQuery(I) +FE=> Query (query="SELECT pg_sleep(5)") +<= BE RowDescription +<= BE DataRow +<= BE CommandComplete(SELECT 1) +<= BE ReadyForQuery(I) FE=> Parse(stmt="", query="BEGIN") FE=> Bind(stmt="", portal="") FE=> Execute(portal="") diff --git a/src/test/extended-query-test/extra_scripts/disable-load-balance-white-function.data b/src/test/extended-query-test/extra_scripts/disable-load-balance-white-function.data index 549e5836d..a0b04a1fa 100755 --- a/src/test/extended-query-test/extra_scripts/disable-load-balance-white-function.data +++ b/src/test/extended-query-test/extra_scripts/disable-load-balance-white-function.data @@ -5,7 +5,7 @@ # Parse: 1 Execute: 1 Parse: 1 Execute: 1 set 0 1 1 1 1 1 1 1 1 1 1 1 1 1 -grep "SELECT" $PGPOOLLOG | grep -v version |awk '{print $9}' | while read node +grep "SELECT" $PGPOOLLOG | grep -v version | grep -v pg_sleep | awk '{print $9}' | while read node do if [ $1 -ne $node ] then diff --git a/src/test/extended-query-test/tests/disable-load-balance-white-function.data b/src/test/extended-query-test/tests/disable-load-balance-white-function.data index 17d493c7b..6399a903d 100644 --- a/src/test/extended-query-test/tests/disable-load-balance-white-function.data +++ b/src/test/extended-query-test/tests/disable-load-balance-white-function.data @@ -14,6 +14,10 @@ 'Q' "CREATE FUNCTION f1(INTEGER) returns INTEGER AS 'SELECT $1' LANGUAGE SQL" 'Y' +# Wait a while to the standby synced with primary. +'Q' "SELECT pg_sleep(5)" +'Y' + # Start a transaction 'P' "" "BEGIN" 0 'B' "" "" 0 0 0 [parent: 51d29aaf7849]