Skip to content
Snippets Groups Projects
Commit 113ea726 authored by Rick Carback's avatar Rick Carback
Browse files

Update Infrastructure Smoke tests to test if some rounds finish

parent b07a65b0
No related branches found
No related tags found
No related merge requests found
...@@ -17,21 +17,19 @@ echo "STARTING SERVERS..." ...@@ -17,21 +17,19 @@ echo "STARTING SERVERS..."
for SERVERID in $(seq 3 -1 1) for SERVERID in $(seq 3 -1 1)
do do
IDX=$(($SERVERID - 1)) IDX=$(($SERVERID - 1))
SERVERCMD="../bin/server -v -i $IDX --roundBufferTimeout 300s --config server-$SERVERID.yaml --noTLS" SERVERCMD="../bin/server -v -i $IDX --roundBufferTimeout 300s --config server-$SERVERID.yaml --noTLS --disablePermissioning"
$SERVERCMD > $SERVERLOGS/server-$SERVERID.console 2>&1 & $SERVERCMD > $SERVERLOGS/server-$SERVERID.console 2>&1 &
PIDVAL=$! PIDVAL=$!
echo "$SERVERCMD -- $PIDVAL" echo "$SERVERCMD -- $PIDVAL"
done done
sleep 5 # Give servers some time to boot
echo "STARTING GATEWAYS..." echo "STARTING GATEWAYS..."
# Start gateways # Start gateways
for GWID in $(seq 3 -1 1) for GWID in $(seq 3 -1 1)
do do
IDX=$(($GWID - 1)) IDX=$(($GWID - 1))
GATEWAYCMD="../bin/gateway -v -i $IDX --config gateway-$GWID.yaml --noTLS" GATEWAYCMD="../bin/gateway -v -i $IDX --config gateway-$GWID.yaml --noTLS --disablePermissioning"
$GATEWAYCMD > $GATEWAYLOGS/gateway-$GWID.console 2>&1 & $GATEWAYCMD > $GATEWAYLOGS/gateway-$GWID.console 2>&1 &
PIDVAL=$! PIDVAL=$!
echo "$GATEWAYCMD -- $PIDVAL" echo "$GATEWAYCMD -- $PIDVAL"
...@@ -47,13 +45,12 @@ finish() { ...@@ -47,13 +45,12 @@ finish() {
echo "KILLING $job" echo "KILLING $job"
kill $job || true kill $job || true
done done
tail $SERVERLOGS/*.console
} }
trap finish EXIT trap finish EXIT
trap finish INT trap finish INT
sleep 60 sleep 5
echo "STOPPING SERVERS AND GATEWAYS..." echo "STOPPING SERVERS AND GATEWAYS..."
# NOTE: jobs -p doesn't work in a signal handler # NOTE: jobs -p doesn't work in a signal handler
...@@ -62,4 +59,27 @@ do ...@@ -62,4 +59,27 @@ do
echo "Stopping $job" echo "Stopping $job"
kill $job kill $job
done done
echo "CHECKING OUTPUT FOR ERRORS"
set +x
cat $SERVERLOGS/server-*.log | grep "ERROR" | grep -v "context" | grep -v "metrics" | grep -v "database" > results/server-errors.txt || true
cat $SERVERLOGS/server-*.log | grep "FATAL" | grep -v "context" | grep -v "database" >> results/server-errors.txt || true
diff -ruN results/server-errors.txt noerrors.txt
cat $GATEWAYLOGS/*.log | grep "ERROR" | grep -v "certificate" | grep -v "context" | grep -v "database" | grep -v "Failed to read key" | grep -v "$IGNOREMSG" > results/gateway-errors.txt || true
cat $GATEWAYLOGS/*.log | grep "FATAL" | grep -v "context" | grep -v "database" >> results/gateway-errors.txt || true
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
echo "FAILURE!"
exit 42
fi
echo "SUCCESS!"
tail $SERVERLOGS/*.console tail $SERVERLOGS/*.console
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment