Add test for timeout in BLPOP.

This commit is contained in:
Vladimir Mihailenco 2013-02-02 16:04:41 +02:00
parent 503a8c8734
commit ed0d065f72
1 changed files with 6 additions and 0 deletions

View File

@ -1258,6 +1258,12 @@ func (t *RedisTest) TestCmdListsBLPopBlocks(c *C) {
}
}
func (t *RedisTest) TestCmdListsBLPopTimeout(c *C) {
bLPop := t.client.BLPop(1, "list1")
c.Assert(bLPop.Err(), Equals, redis.Nil)
c.Assert(bLPop.Val(), IsNil)
}
func (t *RedisTest) TestCmdListsBRPop(c *C) {
rPush := t.client.RPush("list1", "a", "b", "c")
c.Assert(rPush.Err(), IsNil)