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
d0566dae
Commit
d0566dae
authored
May 23, 2014
by
antirez
Browse files
Cluster test: basic failover unit added.
parent
aa5dfb3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/cluster/tests/02-failover.tcl
0 → 100644
View file @
d0566dae
# 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
}}
}
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