mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Close connections to unused nodes
This commit is contained in:
@ -2,15 +2,16 @@ package internal
|
||||
|
||||
import (
|
||||
"testing"
|
||||
. "github.com/onsi/gomega"
|
||||
"time"
|
||||
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
func TestRetryBackoff(t *testing.T) {
|
||||
RegisterTestingT(t)
|
||||
|
||||
for i := -1; i<= 8; i++ {
|
||||
backoff := RetryBackoff(i, 512*time.Millisecond)
|
||||
|
||||
for i := -1; i <= 16; i++ {
|
||||
backoff := RetryBackoff(i, time.Millisecond, 512*time.Millisecond)
|
||||
Expect(backoff >= 0).To(BeTrue())
|
||||
Expect(backoff <= 512*time.Millisecond).To(BeTrue())
|
||||
}
|
||||
|
Reference in New Issue
Block a user