Skip to content

Commit

Permalink
retry when curl command get not zero
Browse files Browse the repository at this point in the history
  • Loading branch information
River2000i committed Nov 18, 2024
1 parent 204b8c1 commit 81dfe81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dm/tests/_utils/run_downstream_cluster
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit 81dfe81

Please sign in to comment.