Commit 56cb037a authored by antirez's avatar antirez
Browse files

Sentinel test: check reconfig of slaves and old master.

parent d4edf63b
...@@ -72,3 +72,23 @@ test "Basic failover works if the master is down" { ...@@ -72,3 +72,23 @@ test "Basic failover works if the master is down" {
test "New master [join $addr {:}] role matches" { test "New master [join $addr {:}] role matches" {
assert {[RI $master_id role] eq {master}} 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"
}
}
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