github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/engine/test/integration_tests/e2e_fast_finished/run.sh (about) 1 #!/bin/bash 2 3 set -eu 4 5 WORK_DIR=$OUT_DIR/$TEST_NAME 6 CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) 7 8 CONFIG="$DOCKER_COMPOSE_DIR/3m3e.yaml" 9 CONFIG=$(adjust_config $OUT_DIR $TEST_NAME $CONFIG) 10 echo "using adjusted configs to deploy cluster: $CONFIG" 11 12 function run() { 13 start_engine_cluster $CONFIG 14 # add a delay in case that the cluster is not ready 15 sleep 3s 16 17 for conf in $(ls $CUR_DIR/conf/*.json); do 18 job_id=$(create_job "FakeJob" "$conf" "" "tiflow_job_finished") 19 exec_with_retry --count 100 "curl \"http://127.0.0.1:10245/api/v1/jobs/$job_id\" | tee /dev/stderr | jq -e '.state == \"Finished\"'" 20 echo "job $job_id finished" 21 done 22 } 23 24 trap "stop_engine_cluster $WORK_DIR $CONFIG" EXIT 25 run $* 26 echo "[$(date)] <<<<<< run test case $TEST_NAME success! >>>>>>"