Skip to content

Commit

Permalink
Cluster test: basic failover unit added.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez committed May 23, 2014
1 parent aa5dfb3 commit d0566da
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions tests/cluster/tests/02-failover.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Check the basic monitoring and failover capabilities.

source "../tests/includes/init-tests.tcl"

test "Create a 5 nodes cluster" {
create_cluster 5 5
}

test "Cluster is up" {
assert_cluster_state ok
}

test "Cluster is writable" {
cluster_write_test 0
}

test "Instance #5 is a slave" {
assert {[RI 5 role] eq {slave}}
}

test "Killing one master node" {
kill_instance redis 0
}

test "Cluster should eventually be up again" {
assert_cluster_state ok
}

test "Cluster is writable" {
cluster_write_test 1
}

test "Instance #5 is now a master" {
assert {[RI 5 role] eq {master}}
}

0 comments on commit d0566da

Please sign in to comment.