Commit e344aa4a authored by antirez's avatar antirez
Browse files

Test: fix blocking lists/zsets replication test.

By verifying that it was able to find a regression, and fixing it
accordingly.
parent 8327ccef
......@@ -34,12 +34,13 @@ proc bg_block_op {host port db ops} {
# Zset side
set k zset_[randomInt 10]
set k2 zset_[randomInt 10]
set v1 [randomValue]
set v2 [randomValue]
randpath {
$r zadd $k [randomInt 10000] $v
} {
# Duplicate to balance the probability to push data
$r zadd $k [randomInt 10000] $v
$r zadd $k [randomInt 10000] $v [randomInt 10000] $v2
} {
$r bzpopmin $k 2
} {
......
......@@ -19,8 +19,8 @@ start_server {tags {"repl"}} {
set slave [srv 0 client]
set load_handle0 [start_bg_block_op $master_host $master_port 9 100000]
set load_handle1 [start_bg_block_op $master_host $master_port 11 100000]
set load_handle2 [start_bg_block_op $master_host $master_port 12 100000]
set load_handle1 [start_bg_block_op $master_host $master_port 9 100000]
set load_handle2 [start_bg_block_op $master_host $master_port 9 100000]
test {First server should have role slave after SLAVEOF} {
$slave slaveof $master_host $master_port
......@@ -28,7 +28,7 @@ start_server {tags {"repl"}} {
s 0 role
} {slave}
test {Test replication with parallel clients writing in differnet DBs} {
test {Test replication with blocking lists and sorted sets operations} {
after 25000
stop_bg_block_op $load_handle0
stop_bg_block_op $load_handle1
......
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