summaryrefslogtreecommitdiff
path: root/tests/cluster
diff options
context:
space:
mode:
authorMadelyn Olson <34459052+madolson@users.noreply.github.com>2022-01-10 16:21:05 -0800
committerGitHub <noreply@github.com>2022-01-10 16:21:05 -0800
commitd0949b7c5ccab058b94de651e08589ed5c5219a9 (patch)
tree0d963f2381e289edd42d7c9b72c859b724687342 /tests/cluster
parentbd46a2abf48ca08809e52fb1ea0ca924803cba3e (diff)
downloadredis-d0949b7c5ccab058b94de651e08589ed5c5219a9.tar.gz
Fix timing issue with cluster hostname test (#10086)
Diffstat (limited to 'tests/cluster')
-rw-r--r--tests/cluster/tests/27-endpoints.tcl10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/cluster/tests/27-endpoints.tcl b/tests/cluster/tests/27-endpoints.tcl
index 0cadee2eb..4010b92ed 100644
--- a/tests/cluster/tests/27-endpoints.tcl
+++ b/tests/cluster/tests/27-endpoints.tcl
@@ -166,6 +166,16 @@ test "Verify the nodes configured with prefer hostname only show hostname for ne
# Have a replica meet the isolated node
R 3 cluster meet 127.0.0.1 [get_instance_attrib redis 6 port]
+ # Wait for the isolated node to learn about the rest of the cluster,
+ # which correspond to a single entry in cluster nodes. Note this
+ # doesn't mean the isolated node has successfully contacted each
+ # node.
+ wait_for_condition 50 100 {
+ [llength [split [R 6 CLUSTER NODES] "\n"]] eq 21
+ } else {
+ fail "Isolated node didn't learn about the rest of the cluster *"
+ }
+
# Now, we wait until the two nodes that aren't filtering packets
# to accept our isolated nodes connections. At this point they will
# start showing up in cluster slots.