Skip to content

Commit

Permalink
br: fix the broken incremental backup integration test (#38498)
Browse files Browse the repository at this point in the history
  • Loading branch information
3pointer authored Oct 17, 2022
1 parent 353f482 commit 5d2030e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions br/tests/br_incremental_ddl/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,11 @@ last_backup_ts=$(run_br validate decode --field="end-version" -s "local://$TEST_
run_br --pd $PD_ADDR backup db -s "local://$TEST_DIR/$DB/inc" --db $DB --lastbackupts $last_backup_ts --log-file $LOG

# when we doing incremental backup, we should close domain in one shot session.
# so we can check the log count of `one shot domain closed` to be 2.
# we will call UseOneShotSession twice
# 1. to get the value global variable.
# 2. to get all ddl jobs with session.
# so we can check the log count of `one shot domain closed` to be 1.
# we will call UseOneShotSession once to get the value global variable.
one_shot_session_count=$(cat $LOG | grep "one shot session closed" | wc -l | xargs)
one_shot_domain_count=$(cat $LOG | grep "one shot domain closed" | wc -l | xargs)
if [ "${one_shot_session_count}" -ne "2" ] || [ "$one_shot_domain_count" -ne "2" ];then
if [ "${one_shot_session_count}" -ne "1" ] || [ "$one_shot_domain_count" -ne "1" ];then
echo "TEST: [$TEST_NAME] fail on one shot session check during inc backup, $one_shot_session_count, $one_shot_domain_count"
exit 1
fi
Expand Down

0 comments on commit 5d2030e

Please sign in to comment.