redis/internal/internal_test.go

18 lines
312 B
Go
Raw Normal View History

2017-05-25 08:08:44 +03:00
package internal
import (
"testing"
. "github.com/onsi/gomega"
"time"
)
func TestRetryBackoff(t *testing.T) {
RegisterTestingT(t)
for i := -1; i<= 8; i++ {
backoff := RetryBackoff(i, 512*time.Millisecond)
Expect(backoff >= 0).To(BeTrue())
Expect(backoff <= 512*time.Millisecond).To(BeTrue())
}
}