33 lines
767 B
Bash
Raw Normal View History

2016-12-21 01:36:06 +04:00
#! /bin/bash
set -eu
DOCKER_IMAGE=$1
NETWORK_NAME=$2
NUM_OF_PEERS=$3
NUM_OF_CRASHES=$4
cd "$GOPATH/src/github.com/tendermint/tendermint"
###############################################################
# NUM_OF_CRASHES times:
# restart all peers
# wait for them to sync and check that they are making progress
###############################################################
for i in $(seq 1 "$NUM_OF_CRASHES"); do
echo ""
echo "Restarting all peers! Take $i ..."
2016-12-21 01:36:06 +04:00
# restart all peers
2016-12-22 20:50:13 -05:00
for j in $(seq 1 "$NUM_OF_PEERS"); do
docker stop "local_testnet_$j"
docker start "local_testnet_$j"
2016-12-21 01:36:06 +04:00
done
2016-12-22 20:50:13 -05:00
bash test/p2p/client.sh "$DOCKER_IMAGE" "$NETWORK_NAME" kill_all_$i "test/p2p/kill_all/check_peers.sh $NUM_OF_PEERS"
2016-12-21 01:36:06 +04:00
done
echo ""
echo "PASS"
echo ""