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
77f849b5
Commit
77f849b5
authored
Dec 18, 2015
by
antirez
Browse files
Cluster: verify slaves consistency after resharding.
parent
9b4dd92c
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/cluster/tests/04-resharding.tcl
View file @
77f849b5
...
...
@@ -142,3 +142,26 @@ test "Disable AOF in all the instances" {
R $id config set appendonly no
}
}
test
"Verify slaves consistency"
{
set verified_masters 0
foreach_redis_id id
{
set role
[
R $id role
]
lassign $role myrole myoffset slaves
if
{
$myrole
eq
{
slave
}}
continue
set masterport
[
get_instance_attrib redis $id port
]
set masterdigest
[
R $id debug digest
]
foreach_redis_id sid
{
set srole
[
R $sid role
]
if
{[
lindex $srole 0
]
eq
{
master
}}
continue
if
{[
lindex $srole 2
]
!= $masterport
}
continue
wait_for_condition 1000 500
{
[
R $sid debug digest
]
eq $masterdigest
}
else
{
fail
"Master and slave data digest are different"
}
incr verified_masters
}
}
assert
{
$verified
_masters >= 5
}
}
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