From c135b856c664f12b0fa3197df603db3039fe92c2 Mon Sep 17 00:00:00 2001 From: antirez Date: Sat, 1 Dec 2012 23:07:09 +0100 Subject: [PATCH] Test: regression for issue #801. --- tests/unit/type/list.tcl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/unit/type/list.tcl b/tests/unit/type/list.tcl index 642762cf..e665afc0 100644 --- a/tests/unit/type/list.tcl +++ b/tests/unit/type/list.tcl @@ -190,6 +190,27 @@ start_server { $rd read } {list b} + test "BLPOP with same key multiple times should work (issue #801)" { + set rd [redis_deferring_client] + r del list1 list2 + + # Data arriving after the BLPOP. + $rd blpop list1 list2 list2 list1 0 + r lpush list1 a + assert_equal [$rd read] {list1 a} + $rd blpop list1 list2 list2 list1 0 + r lpush list2 b + assert_equal [$rd read] {list2 b} + + # Data already there. + r lpush list1 a + r lpush list2 b + $rd blpop list1 list2 list2 list1 0 + assert_equal [$rd read] {list1 a} + $rd blpop list1 list2 list2 list1 0 + assert_equal [$rd read] {list2 b} + } + test "MULTI/EXEC is isolated from the point of view of BLPOP" { set rd [redis_deferring_client] r del list -- 2.47.2