Improve the condition check.

This commit is contained in:
Oleksii Kliukin 2018-02-22 10:13:46 +01:00
parent a7cd859919
commit 85f7c944c2
1 changed files with 1 additions and 6 deletions

View File

@ -37,12 +37,7 @@ func TestRetryWorkerOneFalse(t *testing.T) {
tick := &mockTicker{t, 0}
result := RetryWorker(1, 3, tick, func() (bool, error) {
counter++
if counter <= 1 {
return false, nil
}
return true, nil
return counter > 1, nil
})
if result != nil {