fix golint issues in core/fx (#486)
This commit is contained in:
@@ -8,12 +8,12 @@ import (
|
||||
)
|
||||
|
||||
func TestRetry(t *testing.T) {
|
||||
assert.NotNil(t, DoWithRetries(func() error {
|
||||
assert.NotNil(t, DoWithRetry(func() error {
|
||||
return errors.New("any")
|
||||
}))
|
||||
|
||||
var times int
|
||||
assert.Nil(t, DoWithRetries(func() error {
|
||||
assert.Nil(t, DoWithRetry(func() error {
|
||||
times++
|
||||
if times == defaultRetryTimes {
|
||||
return nil
|
||||
@@ -22,7 +22,7 @@ func TestRetry(t *testing.T) {
|
||||
}))
|
||||
|
||||
times = 0
|
||||
assert.NotNil(t, DoWithRetries(func() error {
|
||||
assert.NotNil(t, DoWithRetry(func() error {
|
||||
times++
|
||||
if times == defaultRetryTimes+1 {
|
||||
return nil
|
||||
@@ -32,11 +32,11 @@ func TestRetry(t *testing.T) {
|
||||
|
||||
var total = 2 * defaultRetryTimes
|
||||
times = 0
|
||||
assert.Nil(t, DoWithRetries(func() error {
|
||||
assert.Nil(t, DoWithRetry(func() error {
|
||||
times++
|
||||
if times == total {
|
||||
return nil
|
||||
}
|
||||
return errors.New("any")
|
||||
}, WithRetries(total)))
|
||||
}, WithRetry(total)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user