This commit is contained in:
Yatsishin Ilya 2022-10-27 13:30:35 +00:00
parent d8e8dd006f
commit 8a5ef517e3

View File

@ -39,16 +39,16 @@ TIMEOUT=300
NUM_QUERIES=1000
NUM_THREADS=10
TESTS=( "TLPGroupBy" "TLPHaving" "TLPWhere" "TLPDistinct" "TLPAggregate" "NoREC" )
echo ${TESTS[@]}
echo "${TESTS[@]}"
for TEST in ${TESTS[@]}; do
echo $TEST
for TEST in "${TESTS[@]}"; do
echo "$TEST"
if [[ $(wget -q 'localhost:8123' -O-) == 'Ok.' ]]
then
echo "Server is OK"
( java -jar target/sqlancer-*.jar --log-each-select true --print-failed false --num-threads $NUM_THREADS --timeout-seconds $TIMEOUT --num-queries $NUM_QUERIES --username default --password "" clickhouse --oracle $TEST | tee /workspace/$TEST.out ) 3>&1 1>&2 2>&3 | tee /workspace/$TEST.err
( java -jar target/sqlancer-*.jar --log-each-select true --print-failed false --num-threads $NUM_THREADS --timeout-seconds $TIMEOUT --num-queries $NUM_QUERIES --username default --password "" clickhouse --oracle $TEST | tee "/workspace/$TEST.out" ) 3>&1 1>&2 2>&3 | tee "/workspace/$TEST.err"
else
touch /workspace/$TEST.err /workspace/$TEST.out
touch "/workspace/$TEST.err" "/workspace/$TEST.out"
echo "Server is not responding" | tee /workspace/server_crashed.log
fi
done