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

Commit

Permalink
restore: fix build break
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm committed May 27, 2020
1 parent 8ebc18a commit 57352bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/restore/backoff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (s *testBackofferSuite) TearDownSuite(c *C) {

func (s *testBackofferSuite) TestBackoffWithSuccess(c *C) {
var counter int
backoffer := restore.NewBackoffer(10, time.Nanosecond, time.Nanosecond)
backoffer := &newImportSSTBackoffer{attemp: 10, delayTime: time.Nanosecond, maxDelayTime: time.Nanosecond}
err := utils.WithRetry(context.Background(), func() error {
defer func() { counter++ }()
switch counter {
Expand All @@ -51,6 +51,7 @@ func (s *testBackofferSuite) TestBackoffWithSuccess(c *C) {

func (s *testBackofferSuite) TestBackoffWithFatalError(c *C) {
var counter int
backoffer := &newImportSSTBackoffer{attemp: 10, delayTime: time.Nanosecond, maxDelayTime: time.Nanosecond}
err := utils.WithRetry(context.Background(), func() error {
defer func() { counter++ }()
switch counter {
Expand All @@ -76,7 +77,7 @@ func (s *testBackofferSuite) TestBackoffWithFatalError(c *C) {

func (s *testBackofferSuite) TestBackoffWithRetryableError(c *C) {
var counter int
backoffer := restore.NewBackoffer(10, time.Nanosecond, time.Nanosecond)
backoffer := &newImportSSTBackoffer{attemp: 10, delayTime: time.Nanosecond, maxDelayTime: time.Nanosecond}
err := utils.WithRetry(context.Background(), func() error {
defer func() { counter++ }()
return errEpochNotMatch
Expand Down

0 comments on commit 57352bb

Please sign in to comment.