From ed0d065f7206eba7428ff7bb7f24e7eca21dce64 Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Sat, 2 Feb 2013 16:04:41 +0200 Subject: [PATCH] Add test for timeout in BLPOP. --- redis_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/redis_test.go b/redis_test.go index 2afccfc..8d39c81 100644 --- a/redis_test.go +++ b/redis_test.go @@ -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)