TestAgentAntiEntropy: Wait until Consul service is up on the agent. (#4591)

* Anti-Entropy test wait for Consul service added

* Reverted some tests back to using WaitForLeader
This commit is contained in:
Siva Prasad 2018-08-28 09:52:11 -04:00 committed by GitHub
parent 09ff5f7224
commit 5fe9053416
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -31,7 +31,7 @@ func TestAgentAntiEntropy_Services(t *testing.T) {
a := &agent.TestAgent{Name: t.Name()}
a.Start()
defer a.Shutdown()
testrpc.WaitForLeader(t, a.RPC, "dc1")
testrpc.WaitForTestAgent(t, a.RPC, "dc1")
// Register info
args := &structs.RegisterRequest{
@ -240,7 +240,7 @@ func TestAgentAntiEntropy_Services_ConnectProxy(t *testing.T) {
a := &agent.TestAgent{Name: t.Name()}
a.Start()
defer a.Shutdown()
testrpc.WaitForLeader(t, a.RPC, "dc1")
testrpc.WaitForTestAgent(t, a.RPC, "dc1")
// Register node info
var out struct{}
@ -378,7 +378,7 @@ func TestAgentAntiEntropy_EnableTagOverride(t *testing.T) {
a := &agent.TestAgent{Name: t.Name()}
a.Start()
defer a.Shutdown()
testrpc.WaitForLeader(t, a.RPC, "dc1")
testrpc.WaitForTestAgent(t, a.RPC, "dc1")
args := &structs.RegisterRequest{
Datacenter: "dc1",
@ -490,7 +490,7 @@ func TestAgentAntiEntropy_Services_WithChecks(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), "")
defer a.Shutdown()
testrpc.WaitForLeader(t, a.RPC, "dc1")
testrpc.WaitForTestAgent(t, a.RPC, "dc1")
{
// Single check
@ -765,7 +765,7 @@ func TestAgentAntiEntropy_Checks(t *testing.T) {
a.Start()
defer a.Shutdown()
testrpc.WaitForLeader(t, a.RPC, "dc1")
testrpc.WaitForTestAgent(t, a.RPC, "dc1")
// Register info
args := &structs.RegisterRequest{
Datacenter: "dc1",
@ -1223,7 +1223,7 @@ func TestAgentAntiEntropy_Check_DeferSync(t *testing.T) {
`}
a.Start()
defer a.Shutdown()
testrpc.WaitForLeader(t, a.RPC, "dc1")
testrpc.WaitForTestAgent(t, a.RPC, "dc1")
// Create a check
check := &structs.HealthCheck{