Commit a700bc74 authored by antirez's avatar antirez
Browse files

Cluster test: more reliable 01-faildet unit.

Do things in a sequence that prevents failover during failure detection.
parent b239a32a
...@@ -6,10 +6,25 @@ test "Create a 5 nodes cluster" { ...@@ -6,10 +6,25 @@ test "Create a 5 nodes cluster" {
create_cluster 5 5 create_cluster 5 5
} }
test "Cluster should start ok" {
assert_cluster_state ok
}
test "Killing two slave nodes" {
kill_instance redis 5
kill_instance redis 6
}
test "Cluster should be still up" {
assert_cluster_state ok
}
test "Killing one master node" { test "Killing one master node" {
kill_instance redis 0 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" { test "Cluster should be down now" {
assert_cluster_state fail assert_cluster_state fail
} }
...@@ -21,12 +36,3 @@ test "Restarting master node" { ...@@ -21,12 +36,3 @@ test "Restarting master node" {
test "Cluster should be up again" { test "Cluster should be up again" {
assert_cluster_state ok assert_cluster_state ok
} }
test "Killing two slave nodes" {
kill_instance redis 5
kill_instance redis 6
}
test "Cluster should be still up" {
assert_cluster_state ok
}
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