mirror of
https://github.com/redis/go-redis.git
synced 2025-07-29 17:41:15 +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:
@ -323,6 +323,8 @@ var _ = Describe("conns reaper", func() {
|
||||
cn.SetUsedAt(time.Now().Add(-2 * idleTimeout))
|
||||
case "aged":
|
||||
cn.SetCreatedAt(time.Now().Add(-2 * maxAge))
|
||||
case "connCheck":
|
||||
_ = cn.Close()
|
||||
}
|
||||
conns = append(conns, cn)
|
||||
staleConns = append(staleConns, cn)
|
||||
@ -409,6 +411,7 @@ var _ = Describe("conns reaper", func() {
|
||||
|
||||
assert("idle")
|
||||
assert("aged")
|
||||
assert("connCheck")
|
||||
})
|
||||
|
||||
var _ = Describe("race", func() {
|
||||
|
Reference in New Issue
Block a user