From d0f2eca8debc875799776a0a9e093ea7c9d51afb Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Tue, 22 Dec 2020 18:27:18 -0500 Subject: [PATCH] Fix one race caused by t.Parallel --- agent/consul/leader_connect_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/agent/consul/leader_connect_test.go b/agent/consul/leader_connect_test.go index ba7122911..9fd781601 100644 --- a/agent/consul/leader_connect_test.go +++ b/agent/consul/leader_connect_test.go @@ -12,16 +12,17 @@ import ( "testing" "time" + uuid "github.com/hashicorp/go-uuid" + msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/hashicorp/consul/agent/connect" "github.com/hashicorp/consul/agent/connect/ca" "github.com/hashicorp/consul/agent/structs" "github.com/hashicorp/consul/agent/token" "github.com/hashicorp/consul/sdk/testutil/retry" "github.com/hashicorp/consul/testrpc" - uuid "github.com/hashicorp/go-uuid" - msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) func TestLeader_SecondaryCA_Initialize(t *testing.T) { @@ -923,8 +924,7 @@ func TestLeader_CARootPruning(t *testing.T) { t.Skip("too slow for testing.Short") } - t.Parallel() - + // Can not use t.Parallel(), because this modifies a global. caRootPruneInterval = 200 * time.Millisecond require := require.New(t)