github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/engine/test/integration_tests/dm_new_collation_off/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_with_s3.yaml $DOCKER_COMPOSE_DIR/dm_databases_tidb_new_collation_off.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 wait_mysql_online.sh --port 3307 15 wait_mysql_online.sh --port 4000 16 17 # prepare data 18 run_sql_file --port 3307 $CUR_DIR/data/db2.prepare.sql 19 20 # create job & wait for job finished 21 job_id=$(create_job "DM" "$CUR_DIR/conf/job.yaml" "dm_new_collation_off") 22 exec_with_retry --count 30 "curl \"http://127.0.0.1:10245/api/v1/jobs/$job_id/status\" | tee /dev/stderr | jq -e '.task_status.\"mysql-02\".status.unit == \"DMSyncTask\"'" 23 24 # check data 25 check_sync_diff $WORK_DIR $CUR_DIR/conf/diff_config.toml 26 27 # insert increment data 28 run_sql_file --port 3307 $CUR_DIR/data/db2.increment.sql 29 30 # check data 31 check_sync_diff $WORK_DIR $CUR_DIR/conf/diff_config.toml 32 } 33 34 trap "stop_engine_cluster $WORK_DIR $CONFIG" EXIT 35 run $* 36 echo "[$(date)] <<<<<< run test case $TEST_NAME success! >>>>>>"