You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
767 B

  1. #! /bin/bash
  2. set -eu
  3. DOCKER_IMAGE=$1
  4. NETWORK_NAME=$2
  5. NUM_OF_PEERS=$3
  6. NUM_OF_CRASHES=$4
  7. cd "$GOPATH/src/github.com/tendermint/tendermint"
  8. ###############################################################
  9. # NUM_OF_CRASHES times:
  10. # restart all peers
  11. # wait for them to sync and check that they are making progress
  12. ###############################################################
  13. for i in $(seq 1 "$NUM_OF_CRASHES"); do
  14. echo ""
  15. echo "Restarting all peers! Take $i ..."
  16. # restart all peers
  17. for j in $(seq 1 "$NUM_OF_PEERS"); do
  18. docker stop "local_testnet_$j"
  19. docker start "local_testnet_$j"
  20. done
  21. bash test/p2p/client.sh "$DOCKER_IMAGE" "$NETWORK_NAME" kill_all_$i "test/p2p/kill_all/check_peers.sh $NUM_OF_PEERS"
  22. done
  23. echo ""
  24. echo "PASS"
  25. echo ""