Skip to content

Commit

Permalink
Fix flaky test TestClusterJoinAndReconnect/TestTLSConnection (#3722)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
gotjosh committed Feb 14, 2024
1 parent b379b29 commit 0fbd018
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cluster/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 0fbd018

Please sign in to comment.