Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
add stop test
Browse files Browse the repository at this point in the history
  • Loading branch information
WangXiangUSTC committed Apr 30, 2020
1 parent b4c9f29 commit ecd45e6
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tests/sharding/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,22 @@ function run() {
# `FIXME: the following case is not supported automatically now, try to support it later`
# so we try to do this `pause-task` and `resume-task` in the case now.
sleep 3
# pause twice, just used to test pause by the way
run_dm_ctl_with_retry $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"pause-task test"\
"\"result\": true" 3
# pause twice
run_dm_ctl_with_retry $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"pause-task test"\
"\"result\": true" 3
# wait really paused
run_dm_ctl_with_retry $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"query-status test" \
"Paused" 2

# resume twice, just used to test resume by the way
run_dm_ctl_with_retry $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"resume-task test"\
"\"result\": true" 3
# resume twice
run_dm_ctl_with_retry $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"resume-task test"\
"\"result\": true" 3
Expand Down Expand Up @@ -137,6 +138,14 @@ function run() {
new_checksum=$(checksum)
echo "checksum before drop/truncate: $old_checksum, checksum after drop/truncate: $new_checksum"
[ "$old_checksum" == "$new_checksum" ]

# stop twice, just used to test stop by the way
run_dm_ctl_with_retry $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"stop-task test"\
"\"result\": true" 3
run_dm_ctl_with_retry $WORK_DIR "127.0.0.1:$MASTER_PORT" \
"stop-task test"\
"task test has no source or not exist" 1
}

cleanup_data db_target
Expand Down

0 comments on commit ecd45e6

Please sign in to comment.