Commit c135b856 authored by antirez's avatar antirez
Browse files

Test: regression for issue #801.

parent 4e6dd7bc
...@@ -190,6 +190,27 @@ start_server { ...@@ -190,6 +190,27 @@ start_server {
$rd read $rd read
} {list b} } {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" { test "MULTI/EXEC is isolated from the point of view of BLPOP" {
set rd [redis_deferring_client] set rd [redis_deferring_client]
r del list r del list
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment