Browse Source

test: better client naming

pull/426/head
Ethan Buchman 8 years ago
parent
commit
fc6d22db32
4 changed files with 15 additions and 7 deletions
  1. +6
    -2
      test/p2p/pex/test_addrbook.sh
  2. +6
    -2
      test/p2p/pex/test_dial_seeds.sh
  3. +2
    -2
      test/p2p/test.sh
  4. +1
    -1
      test/persist/test_failure_indices.sh

+ 6
- 2
test/p2p/pex/test_addrbook.sh View File

@ -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"


+ 6
- 2
test/p2p/pex/test_dial_seeds.sh View File

@ -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"

+ 2
- 2
test/p2p/test.sh View File

@ -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


+ 1
- 1
test/persist/test_failure_indices.sh View File

@ -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


Loading…
Cancel
Save