From d352d16e277a32714bff75af0068b79fc8cf8a0d Mon Sep 17 00:00:00 2001 From: gotjosh Date: Wed, 14 Feb 2024 11:18:28 +0000 Subject: [PATCH] Fix flaky test TestClusterJoinAndReconnect/TestTLSConnection (#3722) wait until `p2.Status()` returns because it blocks until we're ready - that way, we're guaranteed to know that the cluster size is 2. Signed-off-by: gotjosh --- cluster/cluster_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cluster/cluster_test.go b/cluster/cluster_test.go index 76860875..53db6d08 100644 --- a/cluster/cluster_test.go +++ b/cluster/cluster_test.go @@ -335,6 +335,8 @@ func testTLSConnection(t *testing.T) { require.NoError(t, err) go p2.Settle(context.Background(), 0*time.Second) p2.WaitReady(context.Background()) + require.Equal(t, "ready", p2.Status()) + require.Equal(t, 2, p1.ClusterSize()) p2.Leave(0 * time.Second) require.Equal(t, 1, p1.ClusterSize())