Files
MaxScale/maxscale-system-test/test_ctrl_c/test_ctrl_c.sh
Timofey Turenko 8c6ca38a8a add tests
2017-05-23 21:09:30 +03:00

29 lines
415 B
Bash
Executable File

#!/bin/bash
$maxscale_access_sudo service maxscale stop
hm=`pwd`
$hm/start_killer.sh &
if [ $? -ne 0 ] ; then
exit 1
fi
T="$(date +%s)"
$maxscale_access_sudo maxscale -d
if [ $? -ne 0 ] ; then
exit 1
fi
T="$(($(date +%s)-T))"
echo "Time in seconds: ${T} (including 5 seconds before kill)"
if [ "$T" -lt 10 ] ; then
echo "PASSED"
exit 0
else
echo "FAILED"
exit 1
fi