diff options
author | Damian Janowski & Michel Martens <damian.janowski+soveran@gmail.com> | 2010-11-09 10:31:02 -0300 |
---|---|---|
committer | Michel Martens <michel@soveran.com> | 2010-11-29 23:52:07 -0300 |
commit | 7c25a43adc67c4a8d08e930aa92f1c5575ec3646 (patch) | |
tree | e7dd15bff3a1ccd0ec190e865ef2dcfe9817fb9c /tests/unit/type/list.tcl | |
parent | ba3b474111a79bfa378a8c77d89fff600cd5b23a (diff) | |
download | redis-7c25a43adc67c4a8d08e930aa92f1c5575ec3646.tar.gz |
Handle BRPOPLPUSH inside a transaction.
Diffstat (limited to 'tests/unit/type/list.tcl')
-rw-r--r-- | tests/unit/type/list.tcl | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/unit/type/list.tcl b/tests/unit/type/list.tcl index a2d0edf6d..62ea159dd 100644 --- a/tests/unit/type/list.tcl +++ b/tests/unit/type/list.tcl @@ -152,6 +152,19 @@ start_server { assert_equal {foo} [r lrange target 0 -1] } + test "BRPOPLPUSH with a client BLPOPing the target list" { + set rd [redis_deferring_client] + set rd2 [redis_deferring_client] + r del blist target + $rd2 blpop target 0 + $rd brpoplpush blist target 0 + after 1000 + r rpush blist foo + assert_equal foo [$rd read] + assert_equal {target foo} [$rd2 read] + assert_equal 0 [r exists target] + } + test "BRPOPLPUSH with wrong source type" { set rd [redis_deferring_client] r del blist target @@ -178,7 +191,7 @@ start_server { assert_equal {foo} [r lrange blist 0 -1] } - test {BRPOPLPUSH inside a transaction} { + test "BRPOPLPUSH inside a transaction" { r del xlist target r lpush xlist foo r lpush xlist bar |