mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-18 17:46:48 +02:00
Improve the condition check.
This commit is contained in:
@@ -37,12 +37,7 @@ func TestRetryWorkerOneFalse(t *testing.T) {
|
|||||||
tick := &mockTicker{t, 0}
|
tick := &mockTicker{t, 0}
|
||||||
result := RetryWorker(1, 3, tick, func() (bool, error) {
|
result := RetryWorker(1, 3, tick, func() (bool, error) {
|
||||||
counter++
|
counter++
|
||||||
|
return counter > 1, nil
|
||||||
if counter <= 1 {
|
|
||||||
return false, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
return true, nil
|
|
||||||
})
|
})
|
||||||
|
|
||||||
if result != nil {
|
if result != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user