diff options
author | antirez <antirez@gmail.com> | 2012-12-01 23:07:09 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2012-12-01 23:07:09 +0100 |
commit | 6bdcd50b56ba295808729e198bd3b3e5284aba42 (patch) | |
tree | ec52bf5da318d20e3d98bc31d24a0d607a19d60d | |
parent | cac49a90319e83edad5606b4542fedc2c42a2d07 (diff) | |
download | redis-6bdcd50b56ba295808729e198bd3b3e5284aba42.tar.gz |
Test: regression for issue #801.
-rw-r--r-- | tests/unit/type/list.tcl | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/unit/type/list.tcl b/tests/unit/type/list.tcl index 8f598a4ab..c1e46a3b2 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 |