From 10f9d8edfd5d6bdcc8637f1772d8ee335957fbdc Mon Sep 17 00:00:00 2001 From: hc-github-team-consul-core Date: Tue, 18 Oct 2022 11:51:53 -0400 Subject: [PATCH] backport of commit 52957fcb179026c5fa82f84076fe4f5a6d5c4287 (#15031) This pull request was automerged via backport-assistant --- agent/intentions_endpoint_test.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/agent/intentions_endpoint_test.go b/agent/intentions_endpoint_test.go index 148e48f8fbb9..ff17297fc50a 100644 --- a/agent/intentions_endpoint_test.go +++ b/agent/intentions_endpoint_test.go @@ -407,22 +407,22 @@ func TestIntentionGetExact(t *testing.T) { t.Parallel() - hcl := ` - bootstrap = false - bootstrap_expect = 2 - server = true - ` - - a1 := NewTestAgent(t, hcl) - a2 := NewTestAgent(t, hcl) - - _, err := a1.JoinLAN([]string{ - fmt.Sprintf("127.0.0.1:%d", a2.Config.SerfPortLAN), - }, nil) + a1 := NewTestAgent(t, ` + bootstrap = true + server = true + `) + testrpc.WaitForTestAgent(t, a1.RPC, "dc1") + + a2 := NewTestAgent(t, ` + bootstrap = false + server = true + `) + + _, err := a2.JoinLAN([]string{fmt.Sprintf("127.0.0.1:%d", a1.Config.SerfPortLAN)}, nil) require.NoError(t, err) - testrpc.WaitForTestAgent(t, a1.RPC, "dc1") testrpc.WaitForTestAgent(t, a2.RPC, "dc1") + testrpc.WaitForLeader(t, a1.RPC, "dc1") testrpc.WaitForLeader(t, a2.RPC, "dc1")