internal_test.go 332 B

12345678910111213141516171819
  1. package internal
  2. import (
  3. "testing"
  4. "time"
  5. . "github.com/onsi/gomega"
  6. )
  7. func TestRetryBackoff(t *testing.T) {
  8. RegisterTestingT(t)
  9. for i := -1; i <= 16; i++ {
  10. backoff := RetryBackoff(i, time.Millisecond, 512*time.Millisecond)
  11. Expect(backoff >= 0).To(BeTrue())
  12. Expect(backoff <= 512*time.Millisecond).To(BeTrue())
  13. }
  14. }