1
0
mirror of https://github.com/redis/go-redis.git synced 2025-07-29 17:41:15 +03:00

Merge pull request #932 from theodesp/master

Add Client Unblock
This commit is contained in:
Vladimir Mihailenco
2018-12-15 10:01:56 +02:00
committed by GitHub
2 changed files with 26 additions and 0 deletions

View File

@ -127,6 +127,20 @@ var _ = Describe("Commands", func() {
Expect(client.ClientID().Val()).To(BeNumerically(">=", 0))
})
It("should ClientUnblock", func() {
id := client.ClientID().Val()
r, err := client.ClientUnblock(id).Result()
Expect(err).NotTo(HaveOccurred())
Expect(r).To(Equal(int64(0)))
})
It("should ClientUnblockWithError", func() {
id := client.ClientID().Val()
r, err := client.ClientUnblockWithError(id).Result()
Expect(err).NotTo(HaveOccurred())
Expect(r).To(Equal(int64(0)))
})
It("should ClientPause", func() {
err := client.ClientPause(time.Second).Err()
Expect(err).NotTo(HaveOccurred())