Skip to content

Commit

Permalink
playground: test scale tiproxy
Browse files Browse the repository at this point in the history
Signed-off-by: xhe <[email protected]>
  • Loading branch information
xhebox committed Jan 25, 2024
1 parent a614582 commit 37a542e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/tiup-playground/test_playground.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ function kill_all() {
killall -9 pd-server || true
killall -9 tikv-cdc || true
killall -9 tiflash || true
killall -9 tiproxy || true
killall -9 grafana-server || true
killall -9 tiup-playground || true
killall -9 prometheus || true
Expand Down Expand Up @@ -160,4 +161,24 @@ check_instance_num tikv-cdc 2
killall -2 tiup-playground.test || killall -2 tiup-playground
sleep 30

# test for TiProxy
echo -e "\033[0;36m<<< Run TiProxy test >>>\033[0m"
tiup-playground $TIDB_VERSION --db 1 --pd 1 --kv 1 --tiflash 0 --tiproxy 1 --tiproxy.version "nightly" > $outfile 2>&1 &
sleep 3
timeout 300 grep -q "TiDB Playground Cluster is started" <(tail -f $outfile)
tiup-playground display | grep -qv "exit"
# scale out
tiup-playground scale-out --tiproxy 1
sleep 5
check_instance_num tiproxy 2
# scale in
pid=`tiup-playground display | grep "tiproxy" | awk 'NR==1 {print $1}'`
tiup-playground scale-in --pid $pid
sleep 5
check_instance_num tikv-cdc 1

# exit all
killall -2 tiup-playground.test || killall -2 tiup-playground
sleep 30

echo -e "\033[0;36m<<< Run all test success >>>\033[0m"

0 comments on commit 37a542e

Please sign in to comment.