1
0
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:
Vladimir Mihailenco
2018-05-28 17:27:24 +03:00
parent 0f9028adf0
commit faf5666fbd
12 changed files with 219 additions and 207 deletions

View File

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