summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2010-08-30 16:31:03 +0200
committerantirez <antirez@gmail.com>2010-08-30 16:31:03 +0200
commitfb92ecece75ec48efb927fa6c2f2f86a58f73609 (patch)
tree8954ea4a3eea65d1beb753e258f888b074dee08e /tests
parent8079656a8ea7c379815366c6f89f9954e86a57be (diff)
downloadredis-fb92ecece75ec48efb927fa6c2f2f86a58f73609.tar.gz
BLPOP inside MULTI/EXEC block no longer crashes, instead if the list is empty the behavior is like if the timeout is reached. This fixes Issue 285
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/type/list.tcl11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unit/type/list.tcl b/tests/unit/type/list.tcl
index d3ed90ecc..ca0da7644 100644
--- a/tests/unit/type/list.tcl
+++ b/tests/unit/type/list.tcl
@@ -172,6 +172,17 @@ start_server {
}
}
+ test {BLPOP inside a transaction} {
+ r del xlist
+ r lpush xlist foo
+ r lpush xlist bar
+ r multi
+ r blpop xlist 0
+ r blpop xlist 0
+ r blpop xlist 0
+ r exec
+ } {{xlist bar} {xlist foo} {}}
+
test {LPUSHX, RPUSHX - generic} {
r del xlist
assert_equal 0 [r lpushx xlist a]