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

Commit

Permalink
tests: read from tikv
Browse files Browse the repository at this point in the history
Signed-off-by: Hillium <maruruku@stu.csust.edu.cn>
  • Loading branch information
Hillium committed Oct 15, 2020
1 parent 7def25a commit 6734867
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/br_tiflash/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ run_br backup full -s "local://$TEST_DIR/$DB" --pd $PD_ADDR
run_sql "DROP DATABASE $DB"
run_br restore full -s "local://$TEST_DIR/$DB" --pd $PD_ADDR

# FIXME after stopping schedulers, tiflash takes more time to sync, this test may fail in slower computers
sleep 30
AFTER_BR_COUNT=`run_sql "SELECT count(*) FROM $DB.kv;" | sed -n "s/[^0-9]//g;/^[0-9]*$/p" | tail -n1`
# FIXME after stopping schedulers, tiflash takes many time to sync with TiKV(even 30s isn't enough).
AFTER_BR_COUNT=`run_sql "SELECT count(*) /*+ READ_FROM_STORAGE(TIKV[$DB.kv]) */ FROM $DB.kv;" | sed -n "s/[^0-9]//g;/^[0-9]*$/p" | tail -n1`
if [ $AFTER_BR_COUNT -ne $RECORD_COUNT ]; then
echo "failed to restore, before: $RECORD_COUNT; after: $AFTER_BR_COUNT"
exit 1
Expand Down

0 comments on commit 6734867

Please sign in to comment.