Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
a700bc74
Commit
a700bc74
authored
May 23, 2014
by
antirez
Browse files
Cluster test: more reliable 01-faildet unit.
Do things in a sequence that prevents failover during failure detection.
parent
b239a32a
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/cluster/tests/01-faildet.tcl
View file @
a700bc74
...
@@ -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
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment