mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-21 08:23:26 +02:00
Some improvements for golint, ineffassign and misspell
This commit is contained in:
@@ -13,7 +13,7 @@ type mockTicker struct {
|
||||
func (t *mockTicker) Stop() {}
|
||||
|
||||
func (t *mockTicker) Tick() {
|
||||
t.counter += 1
|
||||
t.counter++
|
||||
}
|
||||
|
||||
func TestRetryWorkerSuccess(t *testing.T) {
|
||||
@@ -36,13 +36,13 @@ func TestRetryWorkerOneFalse(t *testing.T) {
|
||||
|
||||
tick := &mockTicker{t, 0}
|
||||
result := RetryWorker(1, 3, tick, func() (bool, error) {
|
||||
counter += 1
|
||||
counter++
|
||||
|
||||
if counter <= 1 {
|
||||
return false, nil
|
||||
} else {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
return true, nil
|
||||
})
|
||||
|
||||
if result != nil {
|
||||
|
||||
Reference in New Issue
Block a user