summaryrefslogtreecommitdiff
path: root/tests/sentinel/tests/includes/init-tests.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sentinel/tests/includes/init-tests.tcl')
-rw-r--r--tests/sentinel/tests/includes/init-tests.tcl22
1 files changed, 2 insertions, 20 deletions
diff --git a/tests/sentinel/tests/includes/init-tests.tcl b/tests/sentinel/tests/includes/init-tests.tcl
index b5baa256f..fe9a61815 100644
--- a/tests/sentinel/tests/includes/init-tests.tcl
+++ b/tests/sentinel/tests/includes/init-tests.tcl
@@ -1,16 +1,5 @@
# Initialization tests -- most units will start including this.
-
-proc restart_killed_instances {} {
- foreach type {redis sentinel} {
- foreach_${type}_id id {
- if {[get_instance_attrib $type $id pid] == -1} {
- puts -nonewline "$type/$id "
- flush stdout
- restart_instance $type $id
- }
- }
- }
-}
+source "../tests/includes/utils.tcl"
test "(init) Restart killed instances" {
restart_killed_instances
@@ -59,14 +48,7 @@ test "(init) Sentinels can talk with the master" {
}
test "(init) Sentinels are able to auto-discover other sentinels" {
- set sentinels [llength $::sentinel_instances]
- foreach_sentinel_id id {
- wait_for_condition 1000 50 {
- [dict get [S $id SENTINEL MASTER mymaster] num-other-sentinels] == ($sentinels-1)
- } else {
- fail "At least some sentinel can't detect some other sentinel"
- }
- }
+ verify_sentinel_auto_discovery
}
test "(init) Sentinels are able to auto-discover slaves" {