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
136537dc
Commit
136537dc
authored
Feb 18, 2014
by
antirez
Browse files
Sentinel test: check reconfig of slaves and old master.
parent
8e553ec6
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/sentinel-tests/00-base.tcl
View file @
136537dc
...
...
@@ -72,3 +72,23 @@ test "Basic failover works if the master is down" {
test
"New master
[
join $addr
{
:
}]
role matches"
{
assert
{[
RI $master_id role
]
eq
{
master
}}
}
test
"All the other slaves now point to the new master"
{
foreach_redis_id id
{
if
{
$id
!= $master_id && $id != 0
}
{
wait_for_condition 1000 50
{
[
RI $id master_port
]
==
[
lindex $addr 1
]
}
else
{
fail
"Redis ID
$id
not configured to replicate with new master"
}
}
}
}
test
"The old master eventually gets reconfigured as a slave"
{
wait_for_condition 1000 50
{
[
RI 0 master_port
]
==
[
lindex $addr 1
]
}
else
{
fail
"Old master not reconfigured as slave of new master"
}
}
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