1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-28 06:42:00 +03:00

feat(pool): add check for badConnection

* fix: badConn check(#2053)

* fix: internalpool test

* fix: sentinel test

* fix: conncheck ut

* fix: remove maxBadConnRetries

* fix: add connCheck.deadline check

Signed-off-by: monkey92t <golang@88.com>
This commit is contained in:
naiqianz
2022-03-21 01:06:47 +08:00
committed by GitHub
parent f5fbb367e7
commit a8a7665ddf
10 changed files with 204 additions and 8 deletions

View File

@ -87,7 +87,7 @@ var _ = Describe("pool", func() {
client.Pool().Put(ctx, cn)
err = client.Ping(ctx).Err()
Expect(err).To(MatchError("bad connection"))
Expect(err).NotTo(HaveOccurred())
val, err := client.Ping(ctx).Result()
Expect(err).NotTo(HaveOccurred())