github.com/aergoio/aergo@v1.3.1/consensus/impl/raftv2/test/test_up_down.sh (about) 1 #!/usr/bin/env bash 2 echo "============================== raft server boot & down test ============================" 3 4 BP_NAME="" 5 6 #rm BP*.toml 7 #./aergoconf-gen.sh 10001 tmpl.toml 5 8 #clean.sh 9 #./inittest.sh 10 source test_common.sh 11 12 echo "" 13 echo "======== make initial server =========" 14 make_node.sh 15 16 checkSync 10001 10002 60 17 checkSync 10001 10003 60 18 19 20 for ((idx=0; idx<=2; idx++)); do 21 echo "try $idx" 22 echo "======== shutdown aergo1 ============" 23 kill_svr.sh 11001 24 sleep 3 25 checkSync 10002 10003 60 26 27 echo "======== restart aergo1 ============" 28 run_svr.sh 11001 29 sleep 2 30 checkSync 10001 10003 60 31 32 33 echo "======== shutdown aergo2 ============" 34 kill_svr.sh 11002 35 sleep 3 36 checkSync 10001 10003 60 37 38 echo "======== restart aergo2 ============" 39 run_svr.sh 11002 40 checkSync 10001 10002 60 41 done