diff --git a/tests/sentinel/tests/includes/init-tests.tcl b/tests/sentinel/tests/includes/init-tests.tcl index c48fb5379..c8165dcfa 100644 --- a/tests/sentinel/tests/includes/init-tests.tcl +++ b/tests/sentinel/tests/includes/init-tests.tcl @@ -12,6 +12,12 @@ test "(init) Restart killed instances" { } } +test "(init) Remove old master entry from sentinels" { + foreach_sentinel_id id { + catch {S $id SENTINEL REMOVE mymaster} + } +} + set redis_slaves 4 test "(init) Create a master-slaves cluster of [expr $redis_slaves+1] instances" { create_redis_master_slave_cluster [expr {$redis_slaves+1}] @@ -22,7 +28,6 @@ test "(init) Sentinels can start monitoring a master" { set sentinels [llength $::sentinel_instances] set quorum [expr {$sentinels/2+1}] foreach_sentinel_id id { - catch {S $id SENTINEL REMOVE mymaster} S $id SENTINEL MONITOR mymaster \ [get_instance_attrib redis $master_id host] \ [get_instance_attrib redis $master_id port] $quorum