diff --git a/backoff/backoff_test.go b/backoff/backoff_test.go index f820c41..27f1c2a 100644 --- a/backoff/backoff_test.go +++ b/backoff/backoff_test.go @@ -53,6 +53,17 @@ func TestMaxIterations(t *testing.T) { } } +func TestSuccessfulExecution(t *testing.T) { + b := NewBackoff() + b.MaxIterations = 5 + + err := b.Retry(func() error { return nil }) + + if err != nil { + t.Errorf("An error was thrown: %s", err) + } +} + func TestWrappedError(t *testing.T) { b := NewBackoff() b.MaxIterations = 5