mirror of
https://github.com/redis/go-redis.git
synced 2025-07-18 00:20:57 +03:00
Fix WithContext and add tests
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package redis_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/go-redis/redis"
|
||||
@ -81,7 +82,7 @@ var _ = Describe("pool", func() {
|
||||
})
|
||||
|
||||
It("removes broken connections", func() {
|
||||
cn, err := client.Pool().Get(nil)
|
||||
cn, err := client.Pool().Get(context.Background())
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
cn.SetNetConn(&badConn{})
|
||||
client.Pool().Put(cn)
|
||||
|
Reference in New Issue
Block a user