Skip to content

Commit

Permalink
fix lightning_fail_fast
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepymole committed Mar 16, 2022
1 parent 81a44a9 commit 5e6a455
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions br/tests/lightning_fail_fast/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

set -eux

export GO_FAILPOINTS='github.com/pingcap/tidb/br/pkg/lightning/restore/SlowDownWriteRows=sleep(50);github.com/pingcap/tidb/br/pkg/lightning/restore/SetMinDeliverBytes=return(1)'
export GO_FAILPOINTS='github.com/pingcap/tidb/br/pkg/lightning/restore/SlowDownWriteRows=sleep(100);github.com/pingcap/tidb/br/pkg/lightning/restore/SetMinDeliverBytes=return(1)'

for CFG in chunk engine; do
rm -f "$TEST_DIR/lightning-tidb.log"
Expand All @@ -27,7 +27,8 @@ for CFG in chunk engine; do

tail -n 10 $TEST_DIR/lightning-tidb.log | grep "ERROR" | tail -n 1 | grep -Fq "Error 1062: Duplicate entry '1-1' for key 'uq'"

grep -Fq "restore file failed" $TEST_DIR/lightning-tidb.log
! grep -Fq "restore file completed" $TEST_DIR/lightning-tidb.log
[ $? -eq 0 ]

! grep -Fq "restore engine completed" $TEST_DIR/lightning-tidb.log
[ $? -eq 0 ]
Expand Down

0 comments on commit 5e6a455

Please sign in to comment.