From f30af37d112a0ad2c3faf214a25615bb067dda30 Mon Sep 17 00:00:00 2001 From: Matt Keeler Date: Wed, 4 Dec 2019 19:19:55 -0500 Subject: [PATCH] Fix the TestLeader_SecondaryCA_IntermediateRefresh test flakiness --- agent/consul/leader_connect_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/agent/consul/leader_connect_test.go b/agent/consul/leader_connect_test.go index 0c161fd9b..fc83dc0c0 100644 --- a/agent/consul/leader_connect_test.go +++ b/agent/consul/leader_connect_test.go @@ -237,6 +237,9 @@ func TestLeader_SecondaryCA_IntermediateRefresh(t *testing.T) { updatedRoot = activeRoot } + testrpc.WaitForActiveCARoot(t, s1.RPC, "dc1", updatedRoot) + testrpc.WaitForActiveCARoot(t, s2.RPC, "dc2", updatedRoot) + // Wait for dc2's intermediate to be refreshed. var intermediatePEM string retry.Run(t, func(r *retry.R) { @@ -248,9 +251,6 @@ func TestLeader_SecondaryCA_IntermediateRefresh(t *testing.T) { }) require.NoError(err) - testrpc.WaitForActiveCARoot(t, s1.RPC, "dc1", updatedRoot) - testrpc.WaitForActiveCARoot(t, s2.RPC, "dc2", updatedRoot) - // Verify the root lists have been rotated in each DC's state store. state1 := s1.fsm.State() _, primaryRoot, err := state1.CARootActive(nil)