mirror of
https://github.com/fluencelabs/redis
synced 2025-04-02 07:41:04 +00:00
Cluster test: more reliable 01-faildet unit.
Do things in a sequence that prevents failover during failure detection.
This commit is contained in:
parent
b239a32aae
commit
a700bc74a8
@ -6,19 +6,7 @@ test "Create a 5 nodes cluster" {
|
|||||||
create_cluster 5 5
|
create_cluster 5 5
|
||||||
}
|
}
|
||||||
|
|
||||||
test "Killing one master node" {
|
test "Cluster should start ok" {
|
||||||
kill_instance redis 0
|
|
||||||
}
|
|
||||||
|
|
||||||
test "Cluster should be down now" {
|
|
||||||
assert_cluster_state fail
|
|
||||||
}
|
|
||||||
|
|
||||||
test "Restarting master node" {
|
|
||||||
restart_instance redis 0
|
|
||||||
}
|
|
||||||
|
|
||||||
test "Cluster should be up again" {
|
|
||||||
assert_cluster_state ok
|
assert_cluster_state ok
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,3 +18,21 @@ test "Killing two slave nodes" {
|
|||||||
test "Cluster should be still up" {
|
test "Cluster should be still up" {
|
||||||
assert_cluster_state ok
|
assert_cluster_state ok
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test "Killing one master node" {
|
||||||
|
kill_instance redis 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# Note: the only slave of instance 0 is already down so no
|
||||||
|
# failover is possible, that would change the state back to ok.
|
||||||
|
test "Cluster should be down now" {
|
||||||
|
assert_cluster_state fail
|
||||||
|
}
|
||||||
|
|
||||||
|
test "Restarting master node" {
|
||||||
|
restart_instance redis 0
|
||||||
|
}
|
||||||
|
|
||||||
|
test "Cluster should be up again" {
|
||||||
|
assert_cluster_state ok
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user