Skip to content

Commit

Permalink
test(dm): fix unstable test due to rely on sleep X seconds (pingcap#6534
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Jul 29, 2022
1 parent e8fd1e9 commit b536d0e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dm/tests/checkpoint_transaction/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ function run() {

run_sql_file $cur/data/db1.increment1.sql $MYSQL_HOST1 $MYSQL_PORT1 $MYSQL_PASSWORD1
# wait transaction start
# you can see why sleep in https://github.com/pingcap/dm/pull/1928#issuecomment-895820239
sleep 2
check_log_contain_with_retry "receive dml job" $WORK_DIR/worker1/log/dm-worker.log
echo "pause task and check status"
run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"pause-task test" \
Expand All @@ -57,8 +56,7 @@ function run() {

run_sql_file $cur/data/db1.increment2.sql $MYSQL_HOST1 $MYSQL_PORT1 $MYSQL_PASSWORD1
# wait transaction start
# you can see why sleep in https://github.com/pingcap/dm/pull/1928#issuecomment-895820239
sleep 2
check_log_contain_with_retry "receive dml job" $WORK_DIR/worker1/log/dm-worker.log
echo "stop task"
run_dm_ctl $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"stop-task test" \
Expand Down

0 comments on commit b536d0e

Please sign in to comment.