diff --git a/command/agent/local_test.go b/command/agent/local_test.go index 27e121888e..237ede2ac5 100644 --- a/command/agent/local_test.go +++ b/command/agent/local_test.go @@ -1423,12 +1423,12 @@ func TestAgent_checkCriticalTime(t *testing.T) { // Wait a while, then fail it again and make sure the time keeps track // of the initial failure, and doesn't reset here. - time.Sleep(10 * time.Millisecond) + time.Sleep(50 * time.Millisecond) l.UpdateCheck(chk.CheckID, api.HealthCritical, "") if crit, ok := l.CriticalChecks()[checkID]; !ok { t.Fatalf("should have a critical check") - } else if crit.CriticalFor < 5*time.Millisecond || - crit.CriticalFor > 15*time.Millisecond { + } else if crit.CriticalFor < 25*time.Millisecond || + crit.CriticalFor > 75*time.Millisecond { t.Fatalf("bad: %#v", crit) } diff --git a/consul/acl_replication_test.go b/consul/acl_replication_test.go index fe5c24d31f..a8801c15ce 100644 --- a/consul/acl_replication_test.go +++ b/consul/acl_replication_test.go @@ -224,7 +224,6 @@ func TestACLReplication_reconcileACLs(t *testing.T) { } func TestACLReplication_updateLocalACLs_RateLimit(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.Datacenter = "dc2" c.ACLDatacenter = "dc1" @@ -274,7 +273,6 @@ func TestACLReplication_updateLocalACLs_RateLimit(t *testing.T) { } func TestACLReplication_IsACLReplicationEnabled(t *testing.T) { - t.Parallel() // ACLs not enabled. dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "" @@ -323,7 +321,6 @@ func TestACLReplication_IsACLReplicationEnabled(t *testing.T) { } func TestACLReplication(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" c.ACLMasterToken = "root" diff --git a/consul/acl_test.go b/consul/acl_test.go index 2bfb0e8f8d..480c792cfd 100644 --- a/consul/acl_test.go +++ b/consul/acl_test.go @@ -23,7 +23,6 @@ key "foo/" { ` func TestACL_Disabled(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -42,7 +41,6 @@ func TestACL_Disabled(t *testing.T) { } func TestACL_ResolveRootACL(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" // Enable ACLs! }) @@ -67,7 +65,6 @@ func TestACL_ResolveRootACL(t *testing.T) { } func TestACL_Authority_NotFound(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" // Enable ACLs! }) @@ -88,7 +85,6 @@ func TestACL_Authority_NotFound(t *testing.T) { } func TestACL_Authority_Found(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" // Enable ACLs! c.ACLMasterToken = "root" @@ -135,7 +131,6 @@ func TestACL_Authority_Found(t *testing.T) { } func TestACL_Authority_Anonymous_Found(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" // Enable ACLs! }) @@ -162,7 +157,6 @@ func TestACL_Authority_Anonymous_Found(t *testing.T) { } func TestACL_Authority_Master_Found(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" // Enable ACLs! c.ACLMasterToken = "foobar" @@ -190,7 +184,6 @@ func TestACL_Authority_Master_Found(t *testing.T) { } func TestACL_Authority_Management(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" // Enable ACLs! c.ACLMasterToken = "foobar" @@ -219,7 +212,6 @@ func TestACL_Authority_Management(t *testing.T) { } func TestACL_NonAuthority_NotFound(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" }) @@ -259,7 +251,6 @@ func TestACL_NonAuthority_NotFound(t *testing.T) { } func TestACL_NonAuthority_Found(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" c.ACLMasterToken = "root" @@ -325,7 +316,6 @@ func TestACL_NonAuthority_Found(t *testing.T) { } func TestACL_NonAuthority_Management(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" // Enable ACLs! c.ACLMasterToken = "foobar" @@ -374,7 +364,6 @@ func TestACL_NonAuthority_Management(t *testing.T) { } func TestACL_DownPolicy_Deny(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" c.ACLDownPolicy = "deny" @@ -440,7 +429,6 @@ func TestACL_DownPolicy_Deny(t *testing.T) { } func TestACL_DownPolicy_Allow(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" c.ACLDownPolicy = "allow" @@ -506,7 +494,6 @@ func TestACL_DownPolicy_Allow(t *testing.T) { } func TestACL_DownPolicy_ExtendCache(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" c.ACLTTL = 0 @@ -583,7 +570,6 @@ func TestACL_DownPolicy_ExtendCache(t *testing.T) { } func TestACL_Replication(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" c.ACLMasterToken = "root" @@ -696,7 +682,6 @@ func TestACL_Replication(t *testing.T) { } func TestACL_MultiDC_Found(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" c.ACLMasterToken = "root" diff --git a/consul/autopilot_test.go b/consul/autopilot_test.go index a4ed98ecae..32d8271d18 100644 --- a/consul/autopilot_test.go +++ b/consul/autopilot_test.go @@ -12,7 +12,6 @@ import ( ) func TestAutopilot_CleanupDeadServer(t *testing.T) { - t.Parallel() for i := 1; i <= 3; i++ { testCleanupDeadServer(t, i) } @@ -77,7 +76,6 @@ func testCleanupDeadServer(t *testing.T, raftVersion int) { } func TestAutopilot_CleanupDeadServerPeriodic(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.Datacenter = "dc1" c.Bootstrap = true @@ -122,7 +120,6 @@ func TestAutopilot_CleanupDeadServerPeriodic(t *testing.T) { } func TestAutopilot_CleanupStaleRaftServer(t *testing.T) { - t.Parallel() dir1, s1 := testServerDCBootstrap(t, "dc1", true) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -171,7 +168,6 @@ func TestAutopilot_CleanupStaleRaftServer(t *testing.T) { } func TestAutopilot_PromoteNonVoter(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.Datacenter = "dc1" c.Bootstrap = true diff --git a/consul/client_test.go b/consul/client_test.go index 6bef0b7f01..af0dc81b4e 100644 --- a/consul/client_test.go +++ b/consul/client_test.go @@ -63,7 +63,6 @@ func testClientWithConfig(t *testing.T, cb func(c *Config)) (string, *Client) { } func TestClient_StartStop(t *testing.T) { - t.Parallel() dir, client := testClient(t) defer os.RemoveAll(dir) @@ -73,7 +72,6 @@ func TestClient_StartStop(t *testing.T) { } func TestClient_JoinLAN(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -98,7 +96,6 @@ func TestClient_JoinLAN(t *testing.T) { } func TestClient_JoinLAN_Invalid(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -122,7 +119,6 @@ func TestClient_JoinLAN_Invalid(t *testing.T) { } func TestClient_JoinWAN_Invalid(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -146,7 +142,6 @@ func TestClient_JoinWAN_Invalid(t *testing.T) { } func TestClient_RPC(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -182,7 +177,6 @@ func TestClient_RPC(t *testing.T) { } func TestClient_RPC_Pool(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -225,7 +219,6 @@ func TestClient_RPC_Pool(t *testing.T) { } func TestClient_RPC_ConsulServerPing(t *testing.T) { - t.Parallel() var servers []*Server var serverDirs []string const numServers = 5 @@ -289,7 +282,6 @@ func TestClient_RPC_ConsulServerPing(t *testing.T) { } func TestClient_RPC_TLS(t *testing.T) { - t.Parallel() dir1, conf1 := testServerConfig(t, "a.testco.internal") conf1.VerifyIncoming = true conf1.VerifyOutgoing = true @@ -335,7 +327,6 @@ func TestClient_RPC_TLS(t *testing.T) { } func TestClient_SnapshotRPC(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -378,7 +369,6 @@ func TestClient_SnapshotRPC(t *testing.T) { } func TestClient_SnapshotRPC_TLS(t *testing.T) { - t.Parallel() dir1, conf1 := testServerConfig(t, "a.testco.internal") conf1.VerifyIncoming = true conf1.VerifyOutgoing = true @@ -434,7 +424,6 @@ func TestClient_SnapshotRPC_TLS(t *testing.T) { } func TestClientServer_UserEvent(t *testing.T) { - t.Parallel() clientOut := make(chan serf.UserEvent, 2) dir1, c1 := testClientWithConfig(t, func(conf *Config) { conf.UserEventHandler = func(e serf.UserEvent) { @@ -511,7 +500,6 @@ func TestClientServer_UserEvent(t *testing.T) { } func TestClient_Encrypted(t *testing.T) { - t.Parallel() dir1, c1 := testClient(t) defer os.RemoveAll(dir1) defer c1.Shutdown() diff --git a/consul/leader_test.go b/consul/leader_test.go index e9f64917c0..d804bc070e 100644 --- a/consul/leader_test.go +++ b/consul/leader_test.go @@ -14,7 +14,6 @@ import ( ) func TestLeader_RegisterMember(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" c.ACLMasterToken = "root" @@ -83,7 +82,6 @@ func TestLeader_RegisterMember(t *testing.T) { } func TestLeader_FailedMember(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" c.ACLMasterToken = "root" @@ -144,7 +142,6 @@ func TestLeader_FailedMember(t *testing.T) { } func TestLeader_LeftMember(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" c.ACLMasterToken = "root" @@ -190,7 +187,6 @@ func TestLeader_LeftMember(t *testing.T) { }) } func TestLeader_ReapMember(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" c.ACLMasterToken = "root" @@ -251,7 +247,6 @@ func TestLeader_ReapMember(t *testing.T) { } func TestLeader_Reconcile_ReapMember(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" c.ACLMasterToken = "root" @@ -300,7 +295,6 @@ func TestLeader_Reconcile_ReapMember(t *testing.T) { } func TestLeader_Reconcile(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" c.ACLMasterToken = "root" @@ -340,7 +334,6 @@ func TestLeader_Reconcile(t *testing.T) { } func TestLeader_Reconcile_Races(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -430,7 +423,6 @@ func TestLeader_Reconcile_Races(t *testing.T) { } func TestLeader_LeftServer(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -468,7 +460,6 @@ func TestLeader_LeftServer(t *testing.T) { } func TestLeader_LeftLeader(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -528,7 +519,6 @@ func TestLeader_LeftLeader(t *testing.T) { } func TestLeader_MultiBootstrap(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -560,7 +550,6 @@ func TestLeader_MultiBootstrap(t *testing.T) { } func TestLeader_TombstoneGC_Reset(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -622,7 +611,6 @@ func TestLeader_TombstoneGC_Reset(t *testing.T) { } func TestLeader_ReapTombstones(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.ACLDatacenter = "dc1" c.ACLMasterToken = "root" @@ -692,7 +680,6 @@ func TestLeader_ReapTombstones(t *testing.T) { } func TestLeader_RollRaftServer(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.Bootstrap = true c.Datacenter = "dc1" @@ -775,7 +762,6 @@ func TestLeader_RollRaftServer(t *testing.T) { } func TestLeader_ChangeServerID(t *testing.T) { - t.Parallel() conf := func(c *Config) { c.Bootstrap = false c.BootstrapExpect = 3 diff --git a/consul/rpc_test.go b/consul/rpc_test.go index 5d1b7eb51c..450571197d 100644 --- a/consul/rpc_test.go +++ b/consul/rpc_test.go @@ -14,7 +14,6 @@ import ( ) func TestRPC_NoLeader_Fail(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.RPCHoldTimeout = 1 * time.Millisecond }) @@ -46,7 +45,6 @@ func TestRPC_NoLeader_Fail(t *testing.T) { } func TestRPC_NoLeader_Retry(t *testing.T) { - t.Parallel() dir1, s1 := testServerWithConfig(t, func(c *Config) { c.RPCHoldTimeout = 10 * time.Second }) @@ -77,7 +75,6 @@ func TestRPC_NoLeader_Retry(t *testing.T) { } func TestRPC_blockingQuery(t *testing.T) { - t.Parallel() dir, s := testServer(t) defer os.RemoveAll(dir) defer s.Shutdown() diff --git a/consul/rtt_test.go b/consul/rtt_test.go index 97d3f70282..e959c5cf3d 100644 --- a/consul/rtt_test.go +++ b/consul/rtt_test.go @@ -131,7 +131,6 @@ func seedCoordinates(t *testing.T, codec rpc.ClientCodec, server *Server) { } func TestRTT_sortNodesByDistanceFrom(t *testing.T) { - t.Parallel() dir, server := testServer(t) defer os.RemoveAll(dir) defer server.Shutdown() @@ -184,7 +183,6 @@ func TestRTT_sortNodesByDistanceFrom(t *testing.T) { } func TestRTT_sortNodesByDistanceFrom_Nodes(t *testing.T) { - t.Parallel() dir, server := testServer(t) defer os.RemoveAll(dir) defer server.Shutdown() @@ -234,7 +232,6 @@ func TestRTT_sortNodesByDistanceFrom_Nodes(t *testing.T) { } func TestRTT_sortNodesByDistanceFrom_ServiceNodes(t *testing.T) { - t.Parallel() dir, server := testServer(t) defer os.RemoveAll(dir) defer server.Shutdown() @@ -284,7 +281,6 @@ func TestRTT_sortNodesByDistanceFrom_ServiceNodes(t *testing.T) { } func TestRTT_sortNodesByDistanceFrom_HealthChecks(t *testing.T) { - t.Parallel() dir, server := testServer(t) defer os.RemoveAll(dir) defer server.Shutdown() @@ -334,7 +330,6 @@ func TestRTT_sortNodesByDistanceFrom_HealthChecks(t *testing.T) { } func TestRTT_sortNodesByDistanceFrom_CheckServiceNodes(t *testing.T) { - t.Parallel() dir, server := testServer(t) defer os.RemoveAll(dir) defer server.Shutdown() diff --git a/consul/session_ttl_test.go b/consul/session_ttl_test.go index 73c74e5ee8..f7f57098d2 100644 --- a/consul/session_ttl_test.go +++ b/consul/session_ttl_test.go @@ -13,7 +13,6 @@ import ( ) func TestInitializeSessionTimers(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -47,7 +46,6 @@ func TestInitializeSessionTimers(t *testing.T) { } func TestResetSessionTimer_Fault(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -88,7 +86,6 @@ func TestResetSessionTimer_Fault(t *testing.T) { } func TestResetSessionTimer_NoTTL(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -123,7 +120,6 @@ func TestResetSessionTimer_NoTTL(t *testing.T) { } func TestResetSessionTimer_InvalidTTL(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -143,7 +139,6 @@ func TestResetSessionTimer_InvalidTTL(t *testing.T) { } func TestResetSessionTimerLocked(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -166,7 +161,6 @@ func TestResetSessionTimerLocked(t *testing.T) { } func TestResetSessionTimerLocked_Renew(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -207,7 +201,6 @@ func TestResetSessionTimerLocked_Renew(t *testing.T) { } func TestInvalidateSession(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -242,7 +235,6 @@ func TestInvalidateSession(t *testing.T) { } func TestClearSessionTimer(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -262,7 +254,6 @@ func TestClearSessionTimer(t *testing.T) { } func TestClearAllSessionTimers(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() @@ -284,7 +275,6 @@ func TestClearAllSessionTimers(t *testing.T) { } func TestServer_SessionTTL_Failover(t *testing.T) { - t.Parallel() dir1, s1 := testServer(t) defer os.RemoveAll(dir1) defer s1.Shutdown() diff --git a/consul/stats_fetcher_test.go b/consul/stats_fetcher_test.go index 69a83404cb..d8615545fb 100644 --- a/consul/stats_fetcher_test.go +++ b/consul/stats_fetcher_test.go @@ -12,7 +12,6 @@ import ( ) func TestStatsFetcher(t *testing.T) { - t.Parallel() dir1, s1 := testServerDCExpect(t, "dc1", 3) defer os.RemoveAll(dir1) defer s1.Shutdown()