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

Improve pool tests by verifying number of created connections.

This commit is contained in:
Vladimir Mihailenco
2016-03-09 13:38:33 +02:00
parent 4edc7a059c
commit 0db1d730c8
5 changed files with 62 additions and 33 deletions

View File

@ -1303,6 +1303,9 @@ var _ = Describe("Commands", func() {
bLPop := client.BLPop(time.Second, "list1")
Expect(bLPop.Val()).To(BeNil())
Expect(bLPop.Err()).To(Equal(redis.Nil))
stats := client.Pool().Stats()
Expect(stats.Requests - stats.Hits - stats.Waits).To(Equal(uint32(1)))
})
It("should BRPop", func() {