Merge pull request from monkey92t/test_error

fix unit test errors that may appear in pool_test.go
This commit is contained in:
Vladimir Mihailenco 2021-03-01 16:49:55 +02:00 committed by GitHub
commit 9b4cabeba3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -105,6 +105,13 @@ var _ = Describe("pool", func() {
})
It("reuses connections", func() {
// explain: https://github.com/go-redis/redis/pull/1675
opt := redisOptions()
opt.MinIdleConns = 0
opt.MaxConnAge = 0
opt.IdleTimeout = 2 * time.Second
client = redis.NewClient(opt)
for i := 0; i < 100; i++ {
val, err := client.Ping(ctx).Result()
Expect(err).NotTo(HaveOccurred())