mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 22:06:20 +00:00
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:
parent
8e7b8bb524
commit
b1a34f899f
@ -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{
|
||||
|
Loading…
x
Reference in New Issue
Block a user