From 81dfe81302f4a080b7c24d580f1841d28f8fb03b Mon Sep 17 00:00:00 2001 From: Jiaqiang Huang <96465211+River2000i@users.noreply.github.com> Date: Mon, 18 Nov 2024 15:48:47 +0800 Subject: [PATCH] retry when curl command get not zero --- dm/tests/_utils/run_downstream_cluster | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dm/tests/_utils/run_downstream_cluster b/dm/tests/_utils/run_downstream_cluster index 36038c74e07..d51f08ad903 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' @@ -75,7 +75,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'