add several attempts to connect in upgrade test

This commit is contained in:
Timofey Turenko
2018-03-29 14:16:26 +03:00
parent 3d92042362
commit 7be55a77bb

View File

@ -92,19 +92,25 @@ else
maxscale_start_cmd="sudo ./maxscale_start.sh 2> /dev/null &"
fi
ssh $sshopt "sudo cp $cnf_file /etc/maxscale.cnf"
ssh $sshopt "$maxscale_start_cmd" &
pid_to_kill=$!
sleep 10
for i in {1..10}
do
sleep 5
ssh $sshopt $maxadmin_command
maxadm_exit=$?
if [ $maxadm_exit == 0 ] ; then
break
fi
done
ssh $sshopt $maxadmin_command
if [ $? != 0 ] ; then
if [ $maxadm_exit != 0 ] ; then
echo "Maxadmin executing error"
res=1
fi
maxadmin_out=`ssh $sshopt $maxadmin_command`
echo $maxadmin_out | grep "CLI"
if [ $? != 0 ] ; then