diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-04 17:58:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-04 17:58:42 +0000 |
commit | d6a20015c95e2a15f0f8dc6fcd73d3f5695e32e7 (patch) | |
tree | 9932358072ca6e6beb6854aba698ecbb3b5532aa /tests/support | |
parent | Releasing progress-linux version 5:7.2.4-1~progress7.99u1. (diff) | |
download | redis-d6a20015c95e2a15f0f8dc6fcd73d3f5695e32e7.tar.xz redis-d6a20015c95e2a15f0f8dc6fcd73d3f5695e32e7.zip |
Merging upstream version 5:7.2.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/support')
-rw-r--r-- | tests/support/cluster_util.tcl | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/support/cluster_util.tcl b/tests/support/cluster_util.tcl index 2e3611e..5160466 100644 --- a/tests/support/cluster_util.tcl +++ b/tests/support/cluster_util.tcl @@ -199,3 +199,30 @@ proc are_hostnames_propagated {match_string} { } return 1 } + +proc wait_node_marked_fail {ref_node_index instance_id_to_check} { + wait_for_condition 1000 50 { + [check_cluster_node_mark fail $ref_node_index $instance_id_to_check] + } else { + fail "Replica node never marked as FAIL ('fail')" + } +} + +proc wait_node_marked_pfail {ref_node_index instance_id_to_check} { + wait_for_condition 1000 50 { + [check_cluster_node_mark fail\? $ref_node_index $instance_id_to_check] + } else { + fail "Replica node never marked as PFAIL ('fail?')" + } +} + +proc check_cluster_node_mark {flag ref_node_index instance_id_to_check} { + set nodes [get_cluster_nodes $ref_node_index] + + foreach n $nodes { + if {[dict get $n id] eq $instance_id_to_check} { + return [cluster_has_flag $n $flag] + } + } + fail "Unable to find instance id in cluster nodes. ID: $instance_id_to_check" +} |