test: possibly fix flake in TestIntentionGetExact (#15021)
Restructure test setup to be similar to TestAgent_ServerCertificate and see if that's enough to avoid flaking after join.
This commit is contained in:
parent
c5f0f33130
commit
0712e1a456
|
@ -407,22 +407,22 @@ func TestIntentionGetExact(t *testing.T) {
|
||||||
|
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
hcl := `
|
a1 := NewTestAgent(t, `
|
||||||
bootstrap = false
|
bootstrap = true
|
||||||
bootstrap_expect = 2
|
server = true
|
||||||
server = true
|
`)
|
||||||
`
|
testrpc.WaitForTestAgent(t, a1.RPC, "dc1")
|
||||||
|
|
||||||
a1 := NewTestAgent(t, hcl)
|
a2 := NewTestAgent(t, `
|
||||||
a2 := NewTestAgent(t, hcl)
|
bootstrap = false
|
||||||
|
server = true
|
||||||
|
`)
|
||||||
|
|
||||||
_, err := a1.JoinLAN([]string{
|
_, err := a2.JoinLAN([]string{fmt.Sprintf("127.0.0.1:%d", a1.Config.SerfPortLAN)}, nil)
|
||||||
fmt.Sprintf("127.0.0.1:%d", a2.Config.SerfPortLAN),
|
|
||||||
}, nil)
|
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
testrpc.WaitForTestAgent(t, a1.RPC, "dc1")
|
|
||||||
testrpc.WaitForTestAgent(t, a2.RPC, "dc1")
|
testrpc.WaitForTestAgent(t, a2.RPC, "dc1")
|
||||||
|
|
||||||
testrpc.WaitForLeader(t, a1.RPC, "dc1")
|
testrpc.WaitForLeader(t, a1.RPC, "dc1")
|
||||||
testrpc.WaitForLeader(t, a2.RPC, "dc1")
|
testrpc.WaitForLeader(t, a2.RPC, "dc1")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue