Skip to content

Commit 9b4cabe

Browse files
authored
Merge pull request #1675 from monkey92t/test_error
fix unit test errors that may appear in pool_test.go
2 parents 491b007 + 7d2e85e commit 9b4cabe

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pool_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@ var _ = Describe("pool", func() {
105105
})
106106

107107
It("reuses connections", func() {
108+
// explain: https://github.com/go-redis/redis/pull/1675
109+
opt := redisOptions()
110+
opt.MinIdleConns = 0
111+
opt.MaxConnAge = 0
112+
opt.IdleTimeout = 2 * time.Second
113+
client = redis.NewClient(opt)
114+
108115
for i := 0; i < 100; i++ {
109116
val, err := client.Ping(ctx).Result()
110117
Expect(err).NotTo(HaveOccurred())

0 commit comments

Comments
 (0)