mirror of
https://github.com/redis/go-redis.git
synced 2025-07-18 00:20:57 +03:00
Cleanup pool
This commit is contained in:
@ -124,12 +124,11 @@ var _ = Describe("Tx", func() {
|
||||
|
||||
It("should recover from bad connection", func() {
|
||||
// Put bad connection in the pool.
|
||||
cn, _, err := client.Pool().Get()
|
||||
cn, err := client.Pool().Get()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
cn.SetNetConn(&badConn{})
|
||||
err = client.Pool().Put(cn)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
client.Pool().Put(cn)
|
||||
|
||||
do := func() error {
|
||||
err := client.Watch(func(tx *redis.Tx) error {
|
||||
|
Reference in New Issue
Block a user