more stress tests for rwsplit router
This commit is contained in:
@ -230,25 +230,47 @@ if [ "$a" != "$TRETVAL" ]; then
|
||||
else
|
||||
echo "$TINPUT PASSED">>$TLOG ;
|
||||
fi
|
||||
|
||||
echo "Session variables" >> $TLOG
|
||||
echo "-----------------------------------" >> $TLOG
|
||||
echo "Session variables: Stress Test 1" >> $TLOG
|
||||
echo "-----------------------------------" >> $TLOG
|
||||
|
||||
RUNCMD=mysql\ --host=$THOST\ -P$TPORT\ -u$TUSER\ -p$TPWD\ --unbuffered=true\ --disable-reconnect\ -vv
|
||||
RUNCMD=mysql\ --host=$THOST\ -P$TPORT\ -u$TUSER\ -p$TPWD\ --unbuffered=true\ --disable-reconnect\ -q\ -r
|
||||
TINPUT=test_sescmd2.sql
|
||||
for ((i = 0;i<1000;i++))
|
||||
do
|
||||
a=`$RUNCMD < ./$TINPUT 2>&1`
|
||||
if [[ "`echo $a|grep -i 'error'`" != "" ]]
|
||||
a=`$RUNCMD < $TINPUT 2>&1`
|
||||
if [[ "`echo "$a"|grep -i 'error'`" != "" ]]
|
||||
then
|
||||
err=`echo "$a" | gawk ' /ERROR/{print a;print $0;exit 0}{a=$0}'`
|
||||
echo "$err" >> $TLOG
|
||||
echo "TEST FAILED" >> $TLOG
|
||||
err=`echo "$a" | grep -i error`
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ "$err" == "" ]]
|
||||
then
|
||||
echo "TEST PASSED" >> $TLOG
|
||||
else
|
||||
echo "$err" >> $TLOG
|
||||
echo "Test FAILED at iteration $((i+1))" >> $TLOG
|
||||
fi
|
||||
echo "-----------------------------------" >> $TLOG
|
||||
echo "Session variables: Stress Test 2" >> $TLOG
|
||||
echo "-----------------------------------" >> $TLOG
|
||||
|
||||
err=""
|
||||
TINPUT=test_sescmd3.sql
|
||||
for ((j = 0;j<1000;j++))
|
||||
do
|
||||
b=`$RUNCMD < $TINPUT 2>&1`
|
||||
if [[ "`echo "$b"|grep -i 'null'`" != "" ]]
|
||||
then
|
||||
err=`echo "$b" | grep -i null`
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ "$err" == "" ]]
|
||||
then
|
||||
echo "TEST PASSED" >> $TLOG
|
||||
else
|
||||
echo "Test FAILED at iteration $((j+1))" >> $TLOG
|
||||
fi
|
||||
echo "" >> $TLOG
|
||||
|
||||
Reference in New Issue
Block a user