1
0
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:
Vladimir Mihailenco
2022-06-04 15:15:43 +03:00
parent 91171f5e19
commit 3a722be811
7 changed files with 17 additions and 16 deletions

View File

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