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
a7da78e4
Commit
a7da78e4
authored
May 19, 2014
by
antirez
Browse files
Cluster test: failure detection initial tests.
parent
4c047447
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/cluster/tests/01-faildet.tcl
0 → 100644
View file @
a7da78e4
# Check the basic monitoring and failover capabilities.
source
"../tests/includes/init-tests.tcl"
proc create_cluster
{
masters slaves
}
{
cluster_allocate_slots $masters
if
{
$slaves
}
{
cluster_allocate_slaves $masters $slaves
}
assert_cluster_state ok
}
test
"Create a 5 nodes cluster"
{
create_cluster 5 0
}
test
"Killing one master node"
{
kill_instance redis 0
}
test
"Cluster should be down now"
{
assert_cluster_state fail
}
test
"Restarting master node"
{
restart_instance redis 0
}
test
"Cluster should be up again"
{
assert_cluster_state ok
}
tests/cluster/tests/includes/init-tests.tcl
View file @
a7da78e4
...
...
@@ -23,6 +23,7 @@ test "Cluster nodes hard reset" {
foreach_redis_id id
{
R $id flushall
R $id cluster reset hard
R $id config set cluster-node-timeout 3000
}
}
...
...
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