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 <josue.abreu@gmail.com>
This commit is contained in:
gotjosh 2024-02-14 11:18:28 +00:00
parent b379b29aa8
commit 0fbd018ebd
No known key found for this signature in database
GPG Key ID: A6E1DDE38FF3C74E
1 changed files with 2 additions and 0 deletions

View File

@ -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())