mirror of
https://github.com/fluencelabs/redis
synced 2025-04-16 14:12:14 +00:00
Cluster test: unit 02 should wait for failover.
This commit is contained in:
parent
6785b39eba
commit
9865ce0e64
@ -18,10 +18,20 @@ test "Instance #5 is a slave" {
|
|||||||
assert {[RI 5 role] eq {slave}}
|
assert {[RI 5 role] eq {slave}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set current_epoch [CI 1 cluster_current_epoch]
|
||||||
|
|
||||||
test "Killing one master node" {
|
test "Killing one master node" {
|
||||||
kill_instance redis 0
|
kill_instance redis 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test "Wait for failover" {
|
||||||
|
wait_for_condition 1000 50 {
|
||||||
|
[CI 1 cluster_current_epoch] > $current_epoch
|
||||||
|
} else {
|
||||||
|
fail "No failover detected"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
test "Cluster should eventually be up again" {
|
test "Cluster should eventually be up again" {
|
||||||
assert_cluster_state ok
|
assert_cluster_state ok
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user