Skip to content

Commit

Permalink
Fix queuedb_rollover test
Browse files Browse the repository at this point in the history
Signed-off-by: Morgan Douglas <[email protected]>
  • Loading branch information
morgando committed May 7, 2024
1 parent d4ba9b7 commit bd2abe4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/queuedb_rollover.test/qdb1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 10 additions & 2 deletions tests/queuedb_rollover.test/qdb_cons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bd2abe4

Please sign in to comment.