Skip to content

Commit

Permalink
increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Lantinga committed Jun 10, 2020
1 parent 766397d commit 1704c7e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions backoff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ func TestStopBackOff(t *testing.T) {
}
}

func TestZeroBackOff(t *testing.T) {
backoff := &ZeroBackOff{}

backoffCpy := backoff.NewBackOff()
_, ok := backoffCpy.(*ZeroBackOff)
if !ok {
t.Error("wrong type from NewBackOff")
}
}

func TestConstantBackOff(t *testing.T) {
backoff := NewConstantBackOff(time.Second)
if backoff.NextBackOff() != time.Second {
Expand Down

0 comments on commit 1704c7e

Please sign in to comment.