diff --git a/tests/unit/cluster/base.tcl b/tests/unit/cluster/base.tcl index 688fd0f275..78e5b897e9 100644 --- a/tests/unit/cluster/base.tcl +++ b/tests/unit/cluster/base.tcl @@ -22,29 +22,6 @@ test "Cluster nodes are reachable" { } } -test "Cluster nodes hard reset" { - for {set id 0} {$id < [llength $::servers]} {incr id} { - if {$::valgrind} { - set node_timeout 10000 - } else { - set node_timeout 3000 - } - catch {R $id flushall} ; # May fail for readonly slaves. - R $id MULTI - R $id cluster reset hard - R $id cluster set-config-epoch [expr {$id+1}] - R $id EXEC - R $id config set cluster-node-timeout $node_timeout - R $id config set cluster-slave-validity-factor 10 - R $id config set loading-process-events-interval-bytes 2097152 - R $id config set key-load-delay 0 - R $id config set repl-diskless-load disabled - R $id config set cluster-announce-hostname "" - R $id DEBUG DROP-CLUSTER-PACKET-FILTER -1 - R $id config rewrite - } -} - test "Cluster Join and auto-discovery test" { # Use multiple attempts since sometimes nodes timeout # while attempting to connect. diff --git a/tests/unit/cluster/no-failover-option.tcl b/tests/unit/cluster/no-failover-option.tcl index deaf61dadc..af13dfa15b 100644 --- a/tests/unit/cluster/no-failover-option.tcl +++ b/tests/unit/cluster/no-failover-option.tcl @@ -2,35 +2,35 @@ source tests/support/cluster.tcl -start_cluster 5 5 {tags {external:skip cluster}} { +start_cluster 3 3 {tags {external:skip cluster}} { test "Cluster is up" { wait_for_cluster_state ok } -test "Instance #5 is a slave" { - assert {[s -5 role] eq {slave}} +test "Instance #3 is a replica" { + assert {[s -3 role] eq {slave}} # Configure it to never failover the master - R 5 CONFIG SET cluster-slave-no-failover yes + R 3 CONFIG SET cluster-replica-no-failover yes } -test "Instance #5 synced with the master" { +test "Instance #3 synced with the master" { wait_for_condition 1000 50 { - [s -5 master_link_status] eq {up} + [s -3 master_link_status] eq {up} } else { - fail "Instance #5 master link status is not up" + fail "Instance #3 master link status is not up" } } test "The nofailover flag is propagated" { - set slave5_id [dict get [cluster_get_myself 5] id] + set replica3_id [dict get [cluster_get_myself 3] id] for {set j 0} {$j < [llength $::servers]} {incr j} { wait_for_condition 1000 50 { - [cluster_has_flag [cluster_get_node_by_id $j $slave5_id] nofailover] + [cluster_has_flag [cluster_get_node_by_id $j $replica3_id] nofailover] } else { - fail "Instance $id can't see the nofailover flag of slave" + fail "Instance $id can't see the nofailover flag of replica" } } } @@ -45,18 +45,14 @@ test "Cluster should be still down after some time" { [CI 2 cluster_state] eq {fail} && [CI 3 cluster_state] eq {fail} && [CI 4 cluster_state] eq {fail} && - [CI 5 cluster_state] eq {fail} && - [CI 6 cluster_state] eq {fail} && - [CI 7 cluster_state] eq {fail} && - [CI 8 cluster_state] eq {fail} && - [CI 9 cluster_state] eq {fail} + [CI 5 cluster_state] eq {fail} } else { fail "Cluster doesn't fail" } } -test "Instance #5 is still a slave" { - assert {[s -5 role] eq {slave}} +test "Instance #3 is still a replica" { + assert {[s -3 role] eq {slave}} } test "Restarting the previously killed master node" {