From bd2abe457e350ce80d412f3bcb5fa9b1f13d0820 Mon Sep 17 00:00:00 2001 From: Morgan Douglas Date: Tue, 7 May 2024 10:43:26 -0400 Subject: [PATCH] Fix queuedb_rollover test Signed-off-by: Morgan Douglas --- tests/queuedb_rollover.test/qdb1.sh | 2 +- tests/queuedb_rollover.test/qdb_cons.sh | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/queuedb_rollover.test/qdb1.sh b/tests/queuedb_rollover.test/qdb1.sh index 914013b64d..10adeece9f 100755 --- a/tests/queuedb_rollover.test/qdb1.sh +++ b/tests/queuedb_rollover.test/qdb1.sh @@ -21,7 +21,7 @@ for ((i=1;i<9600;++i)); do done | cdb2sql $SP_OPTIONS - >/dev/null ./qdb_cons.sh nop0 1 9600 -./qdb_cons.sh log1 1 9600 +./qdb_cons.sh log1 1 9600 $SP_HOST for ((i=1;i<96;++i)); do cdb2sql ${SP_OPTIONS} "exec procedure dml2($i)" 2> /dev/null diff --git a/tests/queuedb_rollover.test/qdb_cons.sh b/tests/queuedb_rollover.test/qdb_cons.sh index 22aa4287dd..f108d03488 100755 --- a/tests/queuedb_rollover.test/qdb_cons.sh +++ b/tests/queuedb_rollover.test/qdb_cons.sh @@ -3,16 +3,24 @@ sp=$1 from=$2 to=$3 +host=$4 logfile="/tmp/queuedb_rollover.$sp" +if [ -z "$host" ]; +then + OPTIONS=$SP_OPTIONS +else + OPTIONS="--host $host $SP_OPTIONS" +fi + rm -f $logfile $logfile.rerun for ((i = $from; i < $to; ++i)); do echo "exec procedure $sp()" -done | cdb2sql $SP_OPTIONS - > /dev/null 2> $logfile +done | cdb2sql $OPTIONS - > /dev/null 2> $logfile #Rerun to compensate for failure due to schemachange n=$(cat $logfile | wc -l) for ((i = 0; i < $n; ++i)); do echo "exec procedure $sp()" -done | tee $logfile.rerun | cdb2sql $SP_OPTIONS - > /dev/null +done | tee $logfile.rerun | cdb2sql $OPTIONS - > /dev/null