1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-31 05:04:23 +03:00

the timeout of WAIT command is in milliseconds.

This commit is contained in:
Ichinose Shogo
2017-02-24 18:03:21 +09:00
committed by Vladimir Mihailenco
parent fe9d145e7c
commit b8fb4a1150
2 changed files with 4 additions and 2 deletions

View File

@ -52,9 +52,11 @@ var _ = Describe("Commands", func() {
It("should Wait", func() {
// assume testing on single redis instance
wait := client.Wait(0, time.Minute)
start := time.Now()
wait := client.Wait(1, time.Second)
Expect(wait.Err()).NotTo(HaveOccurred())
Expect(wait.Val()).To(Equal(int64(0)))
Expect(time.Now()).To(BeTemporally("~", start.Add(time.Second), 800*time.Millisecond))
})
It("should Select", func() {