Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cluster: add integration tests for tiproxy #2371

Merged
merged 8 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions tests/tiup-cluster/script/scale_core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@ function scale_core() {
tiup-cluster $client --yes reload $name --skip-restart

if [ $test_tls = true ]; then
total_sub_one=18
total_sub_one=19
total=20
total_add_one=21
else
total_sub_one=23
total_sub_one=24
total=25
total_add_one=26
fi

echo "start scale in tidb"
Expand Down Expand Up @@ -90,6 +94,16 @@ function scale_core() {
tiup-cluster $client exec $name -N n1 --command "grep -q n3:2379 /home/tidb/deploy/tidb-4000/scripts/run_tidb.sh"
tiup-cluster $client exec $name -N n1 --command "grep -q n3:2379 /home/tidb/deploy/prometheus-9090/conf/prometheus.yml"

echo "start scale out tiproxy"
topo=./topo/full_scale_in_tiproxy.yaml
tiup-cluster $client --yes scale-out $name $topo
wait_instance_num_reach $name $total_add_one $native_ssh

echo "start scale in tiproxy"
tiup-cluster $client --yes scale-in $name -N n1:6000
wait_instance_num_reach $name $total $native_ssh


echo "start scale in tidb"
tiup-cluster $client --yes scale-in $name -N n2:4000
wait_instance_num_reach $name $total_sub_one $native_ssh
Expand Down
12 changes: 6 additions & 6 deletions tests/tiup-cluster/script/scale_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ function scale_tools() {
tiup-cluster $client display $name

if [ $test_tls = true ]; then
total_sub_one=18
total=19
total_add_one=20
total_sub_one=19
total=20
total_add_one=21
else
total_sub_one=20
total=21
total_add_one=22
total_sub_one=21
total=22
total_add_one=23
fi

echo "start scale in pump"
Expand Down
3 changes: 3 additions & 0 deletions tests/tiup-cluster/topo/full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ tiflash_servers:
data_dir: "data1,/data/tiflash-data"
# - host: n4
# - host: n5
#
tiproxy_servers:
- host: n1

pump_servers:
- host: n3
Expand Down
2 changes: 2 additions & 0 deletions tests/tiup-cluster/topo/full_scale_in_tiproxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tiproxy_servers:
- host: n2
3 changes: 3 additions & 0 deletions tests/tiup-cluster/topo/full_tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ pump_servers:
- host: n4
- host: n5

tiproxy_servers:
- host: n1

drainer_servers:
- host: n1
data_dir: /home/tidb/data/drainer-8249/data
Expand Down
3 changes: 3 additions & 0 deletions tests/tiup-cluster/topo/full_without_tiflash.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ drainer_servers:
config:
syncer.db-type: "file"

tiproxy_servers:
- host: n1

cdc_servers:
- host: n3
- host: n4
Expand Down
Loading