From cfe3437c0c3a8da56db1c1e137056caa220c0b8f Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Wed, 5 Jul 2017 11:24:03 +0200 Subject: [PATCH] agent: make Reap test timing less aggressive --- agent/agent_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/agent/agent_test.go b/agent/agent_test.go index 6715dfafe..4b9470a94 100644 --- a/agent/agent_test.go +++ b/agent/agent_test.go @@ -1515,7 +1515,7 @@ func TestAgent_Service_MaintenanceMode(t *testing.T) { func TestAgent_Service_Reap(t *testing.T) { // t.Parallel() // timing test. no parallel cfg := TestConfig() - cfg.CheckReapInterval = time.Millisecond + cfg.CheckReapInterval = 50 * time.Millisecond cfg.CheckDeregisterIntervalMin = 0 a := NewTestAgent(t.Name(), cfg) defer a.Shutdown() @@ -1589,7 +1589,7 @@ func TestAgent_Service_Reap(t *testing.T) { func TestAgent_Service_NoReap(t *testing.T) { // t.Parallel() // timing test. no parallel cfg := TestConfig() - cfg.CheckReapInterval = time.Millisecond + cfg.CheckReapInterval = 50 * time.Millisecond cfg.CheckDeregisterIntervalMin = 0 a := NewTestAgent(t.Name(), cfg) defer a.Shutdown() @@ -1621,7 +1621,7 @@ func TestAgent_Service_NoReap(t *testing.T) { } // Wait for the check TTL to fail. - time.Sleep(100 * time.Millisecond) + time.Sleep(200 * time.Millisecond) if _, ok := a.state.Services()["redis"]; !ok { t.Fatalf("should have redis service") }