diff options
Diffstat (limited to 'vendor/github.com/go-redis/redis/internal/internal_test.go')
-rw-r--r-- | vendor/github.com/go-redis/redis/internal/internal_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vendor/github.com/go-redis/redis/internal/internal_test.go b/vendor/github.com/go-redis/redis/internal/internal_test.go new file mode 100644 index 000000000..5c7000e1e --- /dev/null +++ b/vendor/github.com/go-redis/redis/internal/internal_test.go @@ -0,0 +1,17 @@ +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()) + } +} |