1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-25 08:21:55 +03:00

Merge pull request #1675 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

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())