diff options
author | antirez <antirez@gmail.com> | 2014-05-23 11:40:25 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-05-23 15:54:53 +0200 |
commit | 81af783fecfd303a68a840116e79478ba2d400d1 (patch) | |
tree | aa9c04543d8d65d896b059f19ecd64f465083af6 | |
parent | e62e3c4cb2366bec5a892bae913f99636868cee9 (diff) | |
download | redis-81af783fecfd303a68a840116e79478ba2d400d1.tar.gz |
Cluster test: more reliable 01-faildet unit.
Do things in a sequence that prevents failover during failure detection.
-rw-r--r-- | tests/cluster/tests/01-faildet.tcl | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/tests/cluster/tests/01-faildet.tcl b/tests/cluster/tests/01-faildet.tcl index a31f7eb67..8fe87c91f 100644 --- a/tests/cluster/tests/01-faildet.tcl +++ b/tests/cluster/tests/01-faildet.tcl @@ -6,10 +6,25 @@ test "Create a 5 nodes cluster" { 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" { 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 } @@ -21,12 +36,3 @@ test "Restarting master node" { test "Cluster should be up again" { 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 -} |