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
2355ae9b
Commit
2355ae9b
authored
Jun 19, 2014
by
antirez
Browse files
Sentinel test: tolerate larger delays in init tests.
parent
fd2faee5
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/sentinel/tests/includes/init-tests.tcl
View file @
2355ae9b
...
@@ -37,7 +37,7 @@ test "(init) Sentinels can start monitoring a master" {
...
@@ -37,7 +37,7 @@ test "(init) Sentinels can start monitoring a master" {
test
"(init) Sentinels can talk with the master"
{
test
"(init) Sentinels can talk with the master"
{
foreach_sentinel_id id
{
foreach_sentinel_id id
{
wait_for_condition 100 50
{
wait_for_condition 100
0
50
{
[
catch
{
S $id SENTINEL GET-MASTER-ADDR-BY-NAME mymaster
}]
== 0
[
catch
{
S $id SENTINEL GET-MASTER-ADDR-BY-NAME mymaster
}]
== 0
}
else
{
}
else
{
fail
"Sentinel
$id
can't talk with the master."
fail
"Sentinel
$id
can't talk with the master."
...
@@ -48,7 +48,7 @@ test "(init) Sentinels can talk with the master" {
...
@@ -48,7 +48,7 @@ test "(init) Sentinels can talk with the master" {
test
"(init) Sentinels are able to auto-discover other sentinels"
{
test
"(init) Sentinels are able to auto-discover other sentinels"
{
set sentinels
[
llength $::sentinel_instances
]
set sentinels
[
llength $::sentinel_instances
]
foreach_sentinel_id id
{
foreach_sentinel_id id
{
wait_for_condition 100 50
{
wait_for_condition 100
0
50
{
[
dict get
[
S $id SENTINEL MASTER mymaster
]
num-other-sentinels
]
==
(
$sentinels-1
)
[
dict get
[
S $id SENTINEL MASTER mymaster
]
num-other-sentinels
]
==
(
$sentinels-1
)
}
else
{
}
else
{
fail
"At least some sentinel can't detect some other sentinel"
fail
"At least some sentinel can't detect some other sentinel"
...
@@ -58,7 +58,7 @@ test "(init) Sentinels are able to auto-discover other sentinels" {
...
@@ -58,7 +58,7 @@ test "(init) Sentinels are able to auto-discover other sentinels" {
test
"(init) Sentinels are able to auto-discover slaves"
{
test
"(init) Sentinels are able to auto-discover slaves"
{
foreach_sentinel_id id
{
foreach_sentinel_id id
{
wait_for_condition 100 50
{
wait_for_condition 100
0
50
{
[
dict get
[
S $id SENTINEL MASTER mymaster
]
num-slaves
]
== $redis_slaves
[
dict get
[
S $id SENTINEL MASTER mymaster
]
num-slaves
]
== $redis_slaves
}
else
{
}
else
{
fail
"At least some sentinel can't detect some slave"
fail
"At least some sentinel can't detect some slave"
...
...
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