diff --git a/dm/tests/_utils/run_downstream_cluster b/dm/tests/_utils/run_downstream_cluster index 36038c74e07..997fbc6f14a 100755 --- a/dm/tests/_utils/run_downstream_cluster +++ b/dm/tests/_utils/run_downstream_cluster @@ -34,7 +34,7 @@ EOF --data-dir "$WORK_DIR/pd" & # wait until PD is online... i=0 - while ! curl "http://$PD_ADDR/pd/api/v1/version"; do + while curl "http://$PD_ADDR/pd/api/v1/version"; do i=$((i + 1)) if [ "$i" -gt 20 ]; then echo 'Failed to start PD' @@ -42,6 +42,7 @@ EOF fi sleep 3 done + echo 'Start PD success' } start_tikv() { @@ -54,7 +55,7 @@ start_tikv() { --log-file "$WORK_DIR/tikv.log" \ --log-level info \ -s "$WORK_DIR/tikv" & - while ! curl "http://$PD_ADDR/pd/api/v1/cluster/status" | tee /dev/stderr | grep '"is_initialized": true'; do + while curl "http://$PD_ADDR/pd/api/v1/cluster/status" | tee /dev/stderr | grep '"is_initialized": true'; do i=$((i + 1)) if [ "$i" -gt 20 ]; then echo 'Failed to initialize TiKV cluster' @@ -62,6 +63,7 @@ start_tikv() { fi sleep 5 done + echo 'Start TiKV success' } start_tidb() { @@ -75,7 +77,7 @@ start_tidb() { --log-file "$WORK_DIR/tidb.log" & i=0 - while ! curl "http://$TIDB_IP:10080/status"; do + while curl "http://$TIDB_IP:10080/status"; do i=$((i + 1)) if [ "$i" -gt 50 ]; then echo 'Failed to start TiDB' @@ -83,6 +85,7 @@ start_tidb() { fi sleep 3 done + echo 'Start TiDB success' } start_pd diff --git a/dm/tests/many_tables/run.sh b/dm/tests/many_tables/run.sh index 3fc99f2c4bb..0ffb9a6a680 100644 --- a/dm/tests/many_tables/run.sh +++ b/dm/tests/many_tables/run.sh @@ -151,7 +151,9 @@ function run() { pkill -hup tidb-server 2>/dev/null || true wait_process_exit tidb-server # now worker will process some binlog events, save table checkpoint and meet downstream error + echo "start incremental_data_2" incremental_data_2 + echo "finish incremental_data_2" sleep 30 resume_num=$(grep 'unit process error' $WORK_DIR/worker1/log/dm-worker.log | wc -l) diff --git a/dm/tests/requirements.txt b/dm/tests/requirements.txt index f2293605cf1..8ca17f61940 100644 --- a/dm/tests/requirements.txt +++ b/dm/tests/requirements.txt @@ -1 +1,2 @@ requests +ipaddress diff --git a/dm/tests/tls/run.sh b/dm/tests/tls/run.sh index 3fc76387f38..b5046829b78 100644 --- a/dm/tests/tls/run.sh +++ b/dm/tests/tls/run.sh @@ -42,8 +42,13 @@ EOF --log-file "$WORK_DIR/tidb.log" 2>&1 & sleep 5 + + echo "show databases without TLS" + mysql -uroot -h127.0.0.1 -P4400 --default-character-set utf8 -E -e "SHOW DATABASES;" + echo "drop database tls with TLS" # if execute failed, print tidb's log for debug mysql -uroot -h127.0.0.1 -P4400 --default-character-set utf8 --ssl-ca $cur/conf/ca.pem --ssl-cert $cur/conf/dm.pem --ssl-key $cur/conf/dm.key -E -e "drop database if exists tls" || (cat $WORK_DIR/tidb.log && exit 1) + echo "drop database dm_meta with TLS" mysql -uroot -h127.0.0.1 -P4400 --default-character-set utf8 --ssl-ca $cur/conf/ca.pem --ssl-cert $cur/conf/dm.pem --ssl-key $cur/conf/dm.key -E -e "drop database if exists dm_meta" }