Skip to content

Commit

Permalink
fix unit test errors that may appear in pool_test.go
Browse files Browse the repository at this point in the history
/redis/pool_test.go:119 Expected: <uint32>: 98 to equal: <uint32>: 99

Signed-off-by: monkey <[email protected]>
  • Loading branch information
monkey92t committed Feb 25, 2021
1 parent f4ae0ba commit 42b2a72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ = Describe("pool", func() {
opt := redisOptions()
opt.MinIdleConns = 0
opt.MaxConnAge = 0
opt.IdleTimeout = time.Second
opt.IdleTimeout = 2 * time.Second
client = redis.NewClient(opt)
})

Expand Down Expand Up @@ -135,7 +135,7 @@ var _ = Describe("pool", func() {
StaleConns: 0,
}))

time.Sleep(2 * time.Second)
time.Sleep(3 * time.Second)

stats = client.PoolStats()
Expect(stats).To(Equal(&redis.PoolStats{
Expand Down

0 comments on commit 42b2a72

Please sign in to comment.