Files
MaxScale/maxscale-system-test/run_session_hang.sh
Timofey Turenko cd732ac14f MXS-2243 System tests brings VMs by themselves (#193)
maxscale-system-test changed in order to control test environment by itself.
Every test checks which machines are running, compare with list of needed machines
and start new VMs is they are missing in the running machines list.
Tests are executiong MDBCI commands, MDBCI executable should be in the PATH
2019-04-02 13:27:34 +03:00

39 lines
784 B
Bash
Executable File

#!/bin/bash
###
## @file run_session_hang.sh
## run a set of queries in the loop (see setmix.sql) using Perl client
export ssl_options="--ssl-cert=$src_dir/ssl-cert/client-cert.pem --ssl-key=$src_dir/ssl-cert/client-key.pem"
echo "drop table if exists t1; create table t1(id integer primary key); " | mysql -u$node_user -p$node_password -h${maxscale_000_network} -P 4006 $ssl_options test
if [ $? -ne 0 ]
then
echo "Failed to create table test.t1"
exit 1
fi
res=0
$src_dir/session_hang/run_setmix.sh &
perl $src_dir/session_hang/simpletest.pl
if [ $? -ne 0 ]
then
res=1
fi
sleep 15
echo "show databases;" | mysql -u$node_user -p$node_password -h${maxscale_000_network} -P 4006 $ssl_options
if [ $? -ne 0 ]
then
res=1
fi
echo "Waiting for jobs"
wait
exit $res