diff --git a/tests/unit/cluster/faildet.tcl b/tests/unit/cluster/faildet.tcl index 1a0b888392..ece4cae45e 100644 --- a/tests/unit/cluster/faildet.tcl +++ b/tests/unit/cluster/faildet.tcl @@ -15,8 +15,7 @@ test "Killing two slave nodes" { test "Cluster should be still up" { for {set j 0} {$j < [llength $::servers]} {incr j} { - if {[process_is_paused $paused_pid5]} continue - if {[process_is_paused $paused_pid6]} continue + if {[process_is_paused [srv -$j pid]]} continue wait_for_condition 1000 50 { [CI $j cluster_state] eq "ok" } else { @@ -34,9 +33,7 @@ test "Killing one master node" { # failover is possible, that would change the state back to ok. test "Cluster should be down now" { for {set j 0} {$j < [llength $::servers]} {incr j} { - if {[process_is_paused $paused_pid]} continue - if {[process_is_paused $paused_pid5]} continue - if {[process_is_paused $paused_pid6]} continue + if {[process_is_paused [srv -$j pid]]} continue wait_for_condition 1000 50 { [CI $j cluster_state] eq "ok" } else { @@ -51,8 +48,7 @@ test "Restarting master node" { test "Cluster should be up again" { for {set j 0} {$j < [llength $::servers]} {incr j} { - if {[process_is_paused $paused_pid5]} continue - if {[process_is_paused $paused_pid6]} continue + if {[process_is_paused [srv -$j pid]]} continue wait_for_condition 1000 50 { [CI $j cluster_state] eq "ok" } else { diff --git a/tests/unit/cluster/failover.tcl b/tests/unit/cluster/failover.tcl index 9e84aef4ce..f36fd47fe8 100644 --- a/tests/unit/cluster/failover.tcl +++ b/tests/unit/cluster/failover.tcl @@ -39,7 +39,7 @@ test "Wait for failover" { test "Cluster should eventually be up again" { for {set j 0} {$j < [llength $::servers]} {incr j} { - if {[process_is_paused $paused_pid]} continue + if {[process_is_paused [srv -$j pid]]} continue wait_for_condition 1000 50 { [CI $j cluster_state] eq "ok" } else { diff --git a/tests/unit/cluster/manual-takeover.tcl b/tests/unit/cluster/manual-takeover.tcl index 8a4509b397..a175f79342 100644 --- a/tests/unit/cluster/manual-takeover.tcl +++ b/tests/unit/cluster/manual-takeover.tcl @@ -33,9 +33,7 @@ foreach id $replica_ids { test "Cluster should eventually be down" { for {set j 0} {$j < [llength $::servers]} {incr j} { - if {[process_is_paused $paused_pid]} continue - if {[process_is_paused $paused_pid1]} continue - if {[process_is_paused $paused_pid2]} continue + if {[process_is_paused [srv -$j pid]]} continue wait_for_condition 1000 50 { [CI $j cluster_state] eq "fail" } else { @@ -52,9 +50,7 @@ test "Use takeover to bring slaves back" { test "Cluster should eventually be up again" { for {set j 0} {$j < [llength $::servers]} {incr j} { - if {[process_is_paused $paused_pid]} continue - if {[process_is_paused $paused_pid1]} continue - if {[process_is_paused $paused_pid2]} continue + if {[process_is_paused [srv -$j pid]]} continue wait_for_condition 1000 50 { [CI $j cluster_state] eq "ok" } else { diff --git a/tests/unit/cluster/slave-selection.tcl b/tests/unit/cluster/slave-selection.tcl index 9c047a0d2d..3ae209de0e 100644 --- a/tests/unit/cluster/slave-selection.tcl +++ b/tests/unit/cluster/slave-selection.tcl @@ -94,7 +94,7 @@ test "Wait for the node #10 to return alive before ending the test" { test "Cluster should eventually be up again" { for {set j 0} {$j < [llength $::servers]} {incr j} { - if {[process_is_paused $paused_pid]} continue + if {[process_is_paused [srv -$j pid]]} continue wait_for_condition 1000 50 { [CI $j cluster_state] eq "ok" } else { @@ -190,7 +190,7 @@ test "New Master down consecutively" { } for {set j 0} {$j < [llength $::servers]} {incr j} { - if {[process_is_paused $paused_pid]} continue + if {[process_is_paused [srv -$j pid]]} continue wait_for_condition 1000 50 { [CI $j cluster_state] eq "ok" } else { diff --git a/tests/unit/cluster/slave-stop-cond.tcl b/tests/unit/cluster/slave-stop-cond.tcl index b97c7b6907..85f146a37a 100644 --- a/tests/unit/cluster/slave-stop-cond.tcl +++ b/tests/unit/cluster/slave-stop-cond.tcl @@ -71,7 +71,7 @@ test "Slave #5 should not be able to failover" { test "Cluster should be down" { for {set j 0} {$j < [llength $::servers]} {incr j} { - if {[process_is_paused $paused_pid]} continue + if {[process_is_paused [srv -$j pid]]} continue wait_for_condition 100 50 { [CI $j cluster_state] eq "fail" } else { diff --git a/tests/unit/cluster/update-msg.tcl b/tests/unit/cluster/update-msg.tcl index 2bec2de27c..ce96bcecc5 100644 --- a/tests/unit/cluster/update-msg.tcl +++ b/tests/unit/cluster/update-msg.tcl @@ -48,7 +48,7 @@ test "Wait for failover" { test "Cluster should eventually be up again" { for {set j 0} {$j < [llength $::servers]} {incr j} { - if {[process_is_paused $paused_pid]} continue + if {[process_is_paused [srv -$j pid]]} continue wait_for_condition 1000 50 { [CI $j cluster_state] eq "ok" } else { @@ -72,8 +72,7 @@ test "Killing the new master #5" { test "Cluster should be down now" { for {set j 0} {$j < [llength $::servers]} {incr j} { - if {[process_is_paused $paused_pid]} continue - if {[process_is_paused $paused_pid5]} continue + if {[process_is_paused [srv -$j pid]]} continue wait_for_condition 1000 50 { [CI $j cluster_state] eq "fail" } else {