1
0
mirror of https://github.com/redis/go-redis.git synced 2025-06-14 01:21:30 +03:00

Use time.Duration to specify timeout.

This commit is contained in:
Vladimir Mihailenco
2015-04-07 12:42:16 +03:00
parent 8096f43489
commit fb7803ad5a
2 changed files with 26 additions and 13 deletions

View File

@ -1231,7 +1231,7 @@ var _ = Describe("Commands", func() {
})
It("should BLPop timeout", func() {
bLPop := client.BLPop(1, "list1")
bLPop := client.BLPop(time.Second, "list1")
Expect(bLPop.Val()).To(BeNil())
Expect(bLPop.Err()).To(Equal(redis.Nil))
})
@ -1245,7 +1245,7 @@ var _ = Describe("Commands", func() {
Expect(bRPop.Val()).To(Equal([]string{"list1", "c"}))
})
It("should BRPopBlocks", func() {
It("should BRPop blocks", func() {
started := make(chan bool)
done := make(chan bool)
go func() {