From 00d14cfd036bbc4e4c5d3a46c6e25c1abc2cefb1 Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Thu, 8 Mar 2018 08:24:04 -0800 Subject: [PATCH] test: fix etcd-tester flags Signed-off-by: Gyuho Lee --- test | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/test b/test index 8249c989b..3a46b2a43 100755 --- a/test +++ b/test @@ -82,12 +82,11 @@ function integration_pass { } function functional_pass { - # Clean up any data and logs from previous runs + # Clean up any data and logs from previous runs rm -rf ./agent-* - for a in 1 2 3; do mkdir -p ./agent-$a - ./bin/etcd-agent -etcd-path ./bin/etcd -etcd-log-dir "./agent-$a" -port ":${a}9027" & + ./bin/etcd-agent -etcd-path ./bin/etcd -etcd-log-dir "./agent-$a" -port ":${a}9027" -use-root=false & pid="$!" agent_pids="${agent_pids} $pid" done @@ -102,23 +101,17 @@ function functional_pass { echo "Starting 'etcd-tester'" ./bin/etcd-tester \ -agent-endpoints "127.0.0.1:19027,127.0.0.1:29027,127.0.0.1:39027" \ - -client-ports 1379,2379,3379 \ - -advertise-client-ports 13790,23790,33790 \ - -peer-ports 1380,2380,3380 \ - -advertise-peer-ports 13800,23800,33800 \ + -client-ports 12379,22379,32379 \ + -peer-ports 12380,22380,32380 \ -limit 1 \ -schedule-cases "0 1 2 3 4 5 6 7 8 9" \ - -stress-qps 1000 \ - -stress-key-txn-count 100 \ - -stress-key-txn-ops 10 \ -exit-on-failure && echo "'etcd-tester' succeeded" ETCD_TESTER_EXIT_CODE=$? echo "ETCD_TESTER_EXIT_CODE:" ${ETCD_TESTER_EXIT_CODE} echo "Waiting for processes to exit" - agent_pids=($agent_pids) - kill -s TERM "${agent_pids[@]}" - for a in "${agent_pids[@]}"; do wait "$a" || true; done + kill -s TERM ${agent_pids} + for a in ${agent_pids}; do wait $a || true; done if [[ "${ETCD_TESTER_EXIT_CODE}" -ne "0" ]]; then echo "--- FAIL: exit code" ${ETCD_TESTER_EXIT_CODE}