mirror of https://github.com/status-im/consul.git
Remove `WaitForResult` from two failing tests
This commit is contained in:
parent
f5bd176fb3
commit
f0842409cd
|
@ -173,11 +173,10 @@ func TestClient_RPC_TLS(t *testing.T) {
|
||||||
t.Fatalf("bad len")
|
t.Fatalf("bad len")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
time.Sleep(100 * time.Millisecond)
|
||||||
|
|
||||||
// RPC should succeed
|
// RPC should succeed
|
||||||
testutil.WaitForResult(func() (bool, error) {
|
if err := c1.RPC("Status.Ping", struct{}{}, &out); err != nil {
|
||||||
err := c1.RPC("Status.Ping", struct{}{}, &out)
|
|
||||||
return err == nil, err
|
|
||||||
}, func(err error) {
|
|
||||||
t.Fatalf("err: %v", err)
|
t.Fatalf("err: %v", err)
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -291,16 +291,13 @@ func TestServer_JoinLAN_TLS(t *testing.T) {
|
||||||
t.Fatalf("bad len")
|
t.Fatalf("bad len")
|
||||||
})
|
})
|
||||||
|
|
||||||
// Verify Raft has established a peer
|
time.Sleep(100 * time.Millisecond)
|
||||||
testutil.WaitForResult(func() (bool, error) {
|
|
||||||
return s1.Stats()["raft"]["num_peers"] == "1", nil
|
|
||||||
}, func(err error) {
|
|
||||||
t.Fatalf("no peer established")
|
|
||||||
})
|
|
||||||
|
|
||||||
testutil.WaitForResult(func() (bool, error) {
|
// Verify Raft has established a peer
|
||||||
return s2.Stats()["raft"]["num_peers"] == "1", nil
|
if s1.Stats()["raft"]["num_peers"] != "1" {
|
||||||
}, func(err error) {
|
t.Fatalf("bad: %v", s1.Stats()["raft"])
|
||||||
t.Fatalf("no peer established")
|
}
|
||||||
})
|
if s2.Stats()["raft"]["num_peers"] != "1" {
|
||||||
|
t.Fatalf("bad: %v", s2.Stats()["raft"])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue