agent: make Reap test timing less aggressive

This commit is contained in:
Frank Schroeder 2017-07-05 11:24:03 +02:00 committed by Frank Schröder
parent f0f00a1401
commit cfe3437c0c
1 changed files with 3 additions and 3 deletions

View File

@ -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")
}