summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPieter Noordhuis <pcnoordhuis@gmail.com>2010-12-06 16:04:10 +0100
committerPieter Noordhuis <pcnoordhuis@gmail.com>2010-12-06 16:04:10 +0100
commit8a88c368edbc12540eee3d129b8a017bd6a84cac (patch)
tree3b9541fc5187d398821d357e2598b6277f19e109 /tests
parentac06fc011df598372232a5dc1805683004240c0d (diff)
downloadredis-8a88c368edbc12540eee3d129b8a017bd6a84cac.tar.gz
Check other blocked clients when value could not be pushed
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/type/list.tcl14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/unit/type/list.tcl b/tests/unit/type/list.tcl
index 361644334..8ac128c59 100644
--- a/tests/unit/type/list.tcl
+++ b/tests/unit/type/list.tcl
@@ -191,6 +191,20 @@ start_server {
assert_equal {foo} [r lrange blist 0 -1]
}
+ test "BRPOPLPUSH with multiple blocked clients" {
+ set rd1 [redis_deferring_client]
+ set rd2 [redis_deferring_client]
+ r del blist target1 target2
+ r set target1 nolist
+ $rd1 brpoplpush blist target1 0
+ $rd2 brpoplpush blist target2 0
+ r lpush blist foo
+
+ assert_error "ERR*wrong kind*" {$rd1 read}
+ assert_equal {foo} [$rd2 read]
+ assert_equal {foo} [r lrange target2 0 -1]
+ }
+
test "linked BRPOPLPUSH" {
set rd1 [redis_deferring_client]
set rd2 [redis_deferring_client]