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:
parent
c2cf3db045
commit
d352d16e27
|
@ -335,6 +335,8 @@ func testTLSConnection(t *testing.T) {
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
go p2.Settle(context.Background(), 0*time.Second)
|
go p2.Settle(context.Background(), 0*time.Second)
|
||||||
p2.WaitReady(context.Background())
|
p2.WaitReady(context.Background())
|
||||||
|
require.Equal(t, "ready", p2.Status())
|
||||||
|
|
||||||
require.Equal(t, 2, p1.ClusterSize())
|
require.Equal(t, 2, p1.ClusterSize())
|
||||||
p2.Leave(0 * time.Second)
|
p2.Leave(0 * time.Second)
|
||||||
require.Equal(t, 1, p1.ClusterSize())
|
require.Equal(t, 1, p1.ClusterSize())
|
||||||
|
|
Loading…
Reference in New Issue