From fc6d22db320c71427d3f45c20b6b5ef408d35740 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Mon, 6 Mar 2017 01:04:55 -0500 Subject: [PATCH] test: better client naming --- test/p2p/pex/test_addrbook.sh | 8 ++++++-- test/p2p/pex/test_dial_seeds.sh | 8 ++++++-- test/p2p/test.sh | 4 ++-- test/persist/test_failure_indices.sh | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/test/p2p/pex/test_addrbook.sh b/test/p2p/pex/test_addrbook.sh index 0fd02fa95..d63096c8d 100644 --- a/test/p2p/pex/test_addrbook.sh +++ b/test/p2p/pex/test_addrbook.sh @@ -12,6 +12,8 @@ echo "----------------------------------------------------------------------" echo "Testing pex creates the addrbook and uses it if seeds are not provided" echo "(assuming peers are started with pex enabled)" +CLIENT_NAME="pex_addrbook_$ID" + echo "1. restart peer $ID" docker stop "local_testnet_$ID" # preserve addrbook.json @@ -30,12 +32,14 @@ cat /tmp/addrbook.json echo "" # if the client runs forever, it means addrbook wasn't saved or was empty -bash test/p2p/client.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "pex_$ID" "test/p2p/pex/check_peer.sh $ID $N" +bash test/p2p/client.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$CLIENT_NAME" "test/p2p/pex/check_peer.sh $ID $N" echo "----------------------------------------------------------------------" echo "Testing other peers connect to us if we have neither seeds nor the addrbook" echo "(assuming peers are started with pex enabled)" +CLIENT_NAME="pex_no_addrbook_$ID" + echo "1. restart peer $ID" docker stop "local_testnet_$ID" set +e #CIRCLE @@ -46,7 +50,7 @@ set -e bash test/p2p/peer.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$ID" "$PROXY_APP" "--pex" # if the client runs forever, it means other peers have removed us from their books (which should not happen) -bash test/p2p/client.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "pex_$ID" "test/p2p/pex/check_peer.sh $ID $N" +bash test/p2p/client.sh "$DOCKER_IMAGE" "$NETWORK_NAME" "$CLIENT_NAME" "test/p2p/pex/check_peer.sh $ID $N" echo "" echo "PASS" diff --git a/test/p2p/pex/test_dial_seeds.sh b/test/p2p/pex/test_dial_seeds.sh index 5b0bfffbd..ea72004db 100644 --- a/test/p2p/pex/test_dial_seeds.sh +++ b/test/p2p/pex/test_dial_seeds.sh @@ -24,9 +24,13 @@ set -e SEEDS="" bash test/p2p/local_testnet_start.sh $DOCKER_IMAGE $NETWORK_NAME $N $PROXY_APP $SEEDS + + # dial seeds from one node -bash test/p2p/client.sh $DOCKER_IMAGE $NETWORK_NAME dial_seeds "test/p2p/pex/dial_seeds.sh $N" +CLIENT_NAME="dial_seeds" +bash test/p2p/client.sh $DOCKER_IMAGE $NETWORK_NAME $CLIENT_NAME "test/p2p/pex/dial_seeds.sh $N" # test basic connectivity and consensus # start client container and check the num peers and height for all nodes -bash test/p2p/client.sh $DOCKER_IMAGE $NETWORK_NAME basic "test/p2p/basic/test.sh $N" +CLIENT_NAME="dial_seeds_basic" +bash test/p2p/client.sh $DOCKER_IMAGE $NETWORK_NAME $CLIENT_NAME "test/p2p/basic/test.sh $N" diff --git a/test/p2p/test.sh b/test/p2p/test.sh index 0522a422c..3e67dfbd5 100644 --- a/test/p2p/test.sh +++ b/test/p2p/test.sh @@ -27,8 +27,8 @@ bash test/p2p/client.sh $DOCKER_IMAGE $NETWORK_NAME basic "test/p2p/basic/test.s # start client container and test sending a tx to each node bash test/p2p/client.sh $DOCKER_IMAGE $NETWORK_NAME ab "test/p2p/atomic_broadcast/test.sh $N" -# test fast sync (from current state of network): -# for each node, kill it and readd via fast sync + test fast sync (from current state of network): + for each node, kill it and readd via fast sync bash test/p2p/fast_sync/test.sh $DOCKER_IMAGE $NETWORK_NAME $N $PROXY_APP # test killing all peers 3 times diff --git a/test/persist/test_failure_indices.sh b/test/persist/test_failure_indices.sh index 42a76cb83..cb78297e2 100644 --- a/test/persist/test_failure_indices.sh +++ b/test/persist/test_failure_indices.sh @@ -102,7 +102,7 @@ for failIndex in $(seq $failsStart $failsEnd); do curl -s "$addr/status" > /dev/null ERR=$? i=$((i + 1)) - if [[ $i == 10 ]]; then + if [[ $i == 20 ]]; then echo "Timed out waiting for tendermint to start" exit 1 fi