Skip to content
Snippets Groups Projects
Commit 5cebbe13 authored by Josh Brooks's avatar Josh Brooks
Browse files

Add integration check for closing server

parent 19c78db0
No related branches found
No related tags found
1 merge request!4Release
......@@ -18,7 +18,7 @@ PIDVAL=$!
echo "$PERMCMD -- $PIDVAL"
echo "STARTING SERVERS..."
PID_SERVER_KILLED=$!
for SERVERID in $(seq 3 -1 1)
do
IDX=$(($SERVERID - 1))
......@@ -26,6 +26,9 @@ do
$SERVERCMD > $SERVERLOGS/server-$SERVERID.console 2>&1 &
PIDVAL=$!
echo "$SERVERCMD -- $PIDVAL"
if [ $SERVERID -eq 1 ]; then
PID_SERVER_KILLED=$PIDVAL
fi
if [ $SERVERID -eq 2 ]; then
sleep 10 # This will force a CDE timeout
fi
......@@ -69,6 +72,13 @@ while [ ! -s rid.txt ] && [ $cnt -lt 240 ]; do
echo -n "."
done
# Kill the last server
echo "KILLING SERVER 0"
echo $PID_SERVER_KILLED
kill -2 $PID_SERVER_KILLED
# Wait for node to handle kill signal
sleep 30
echo "CHECKING OUTPUT FOR ERRORS"
set +x
......@@ -82,6 +92,9 @@ diff -ruN results/gateway-errors.txt noerrors.txt
echo "NO OUTPUT ERRORS"
echo "CHECKING THAT AT LEAST 2 ROUNDS RAN"
cat results/server-3.log | grep "RID 1 ReceiveFinishRealtime END" > rid.txt || true
if [ ! -s rid.txt ]; then
......@@ -89,5 +102,14 @@ if [ ! -s rid.txt ]; then
exit 42
fi
echo "CHECKING THAT SERVER 0 WAS KILLED PROPERLY"
cat $SERVERLOGS/server-0.log | grep "Round completed, closing!" > serverClose.txt || true
if [ -s serverClose.txt ]; then
echo "SERVER 0 CLOSED SUCCESSFULLY"
else
echo "SERVER 0 WAS NOT CLOSED PROPERLY"
exit 42
fi
tail $SERVERLOGS/*.console
echo "SUCCESS!"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment