Skip to content

Commit 0fbd018

Browse files
committed
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 <[email protected]>
1 parent b379b29 commit 0fbd018

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cluster/cluster_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@ func testTLSConnection(t *testing.T) {
335335
require.NoError(t, err)
336336
go p2.Settle(context.Background(), 0*time.Second)
337337
p2.WaitReady(context.Background())
338+
require.Equal(t, "ready", p2.Status())
339+
338340
require.Equal(t, 2, p1.ClusterSize())
339341
p2.Leave(0 * time.Second)
340342
require.Equal(t, 1, p1.ClusterSize())

0 commit comments

Comments
 (0)