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
9865ce0e
Commit
9865ce0e
authored
Jun 10, 2014
by
antirez
Browse files
Cluster test: unit 02 should wait for failover.
parent
6785b39e
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/cluster/tests/02-failover.tcl
View file @
9865ce0e
...
@@ -18,10 +18,20 @@ test "Instance #5 is a slave" {
...
@@ -18,10 +18,20 @@ test "Instance #5 is a slave" {
assert
{[
RI 5 role
]
eq
{
slave
}}
assert
{[
RI 5 role
]
eq
{
slave
}}
}
}
set current_epoch
[
CI 1 cluster_current_epoch
]
test
"Killing one master node"
{
test
"Killing one master node"
{
kill_instance redis 0
kill_instance redis 0
}
}
test
"Wait for failover"
{
wait_for_condition 1000 50
{
[
CI 1 cluster_current_epoch
]
> $current_epoch
}
else
{
fail
"No failover detected"
}
}
test
"Cluster should eventually be up again"
{
test
"Cluster should eventually be up again"
{
assert_cluster_state ok
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