mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 08:08:53 -05:00
Test: fix blocking lists/zsets replication test.
By verifying that it was able to find a regression, and fixing it accordingly.
This commit is contained in:
parent
8327ccef0e
commit
e344aa4a6d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user