Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
c135b856
Commit
c135b856
authored
Dec 01, 2012
by
antirez
Browse files
Test: regression for issue #801.
parent
4e6dd7bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/unit/type/list.tcl
View file @
c135b856
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment