• Binbin's avatar
    Fix redis-cli cluster add-node race in cli.tcl (#11349) · 3c525fab
    Binbin authored
    There is a race condition in the test:
    ```
    *** [err]: redis-cli --cluster add-node with cluster-port in tests/unit/cluster/cli.tcl
    Expected '5' to be equal to '4' {assert_equal 5 [CI 0 cluster_known_nodes]} proc ::test)
    ```
    
    When using cli to add node, there can potentially be a race condition
    in which all nodes presenting cluster state o.k even though the added
    node did not yet meet all cluster nodes.
    
    This comment and the fix were taken from #11221. Also apply it in several
    other similar places.
    
    (cherry picked from commit a549b78c)
    3c525fab
cluster.tcl 15 KB