mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
fix: fix tests
This commit is contained in:
@ -86,13 +86,14 @@ var _ = Describe("pool", func() {
|
||||
cn.SetNetConn(&badConn{})
|
||||
client.Pool().Put(ctx, cn)
|
||||
|
||||
err = client.Ping(ctx).Err()
|
||||
Expect(err).To(MatchError("bad connection"))
|
||||
|
||||
val, err := client.Ping(ctx).Result()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(val).To(Equal("PONG"))
|
||||
|
||||
val, err = client.Ping(ctx).Result()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(val).To(Equal("PONG"))
|
||||
|
||||
pool := client.Pool()
|
||||
Expect(pool.Len()).To(Equal(1))
|
||||
Expect(pool.IdleLen()).To(Equal(1))
|
||||
|
Reference in New Issue
Block a user