mirror of
https://github.com/status-im/consul.git
synced 2025-02-18 08:36:46 +00:00
add wait to TestClient_JoinLAN
This commit is contained in:
parent
136df63e2c
commit
77eecf1046
@ -84,8 +84,10 @@ func TestClient_JoinLAN(t *testing.T) {
|
|||||||
defer os.RemoveAll(dir2)
|
defer os.RemoveAll(dir2)
|
||||||
defer c1.Shutdown()
|
defer c1.Shutdown()
|
||||||
|
|
||||||
|
testrpc.WaitForLeader(t, s1.RPC, "dc1")
|
||||||
// Try to join
|
// Try to join
|
||||||
joinLAN(t, c1, s1)
|
joinLAN(t, c1, s1)
|
||||||
|
testrpc.WaitForTestAgent(t, c1.RPC, "dc1")
|
||||||
retry.Run(t, func(r *retry.R) {
|
retry.Run(t, func(r *retry.R) {
|
||||||
if got, want := c1.routers.NumServers(), 1; got != want {
|
if got, want := c1.routers.NumServers(), 1; got != want {
|
||||||
r.Fatalf("got %d servers want %d", got, want)
|
r.Fatalf("got %d servers want %d", got, want)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user