Skip to content

Commit

Permalink
br: improve TestNewImportSSTBackofferWithSucess (#45683)
Browse files Browse the repository at this point in the history
close #45684
  • Loading branch information
hawkingrei authored Jul 31, 2023
1 parent 37893f4 commit 697652f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion br/pkg/utils/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ go_library(

go_test(
name = "utils_test",
timeout = "moderate",
timeout = "short",
srcs = [
"backoff_test.go",
"cdc_test.go",
Expand Down
4 changes: 2 additions & 2 deletions br/pkg/utils/backoff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ func TestNewImportSSTBackofferWithSucess(t *testing.T) {
backoffer := utils.NewImportSSTBackoffer()
err := utils.WithRetry(context.Background(), func() error {
defer func() { counter++ }()
if counter == 15 {
if counter == 5 {
return nil
}
return berrors.ErrKVDownloadFailed
}, backoffer)
require.Equal(t, 16, counter)
require.Equal(t, 6, counter)
require.NoError(t, err)
}

Expand Down

0 comments on commit 697652f

Please sign in to comment.