From 8936570c59e72fee9daddd7eaca19142713174f9 Mon Sep 17 00:00:00 2001 From: KeeganForelight Date: Wed, 14 Jun 2023 13:07:35 -0400 Subject: [PATCH] improved manager test coverage --- internal/pkg/manager/manager_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/pkg/manager/manager_test.go b/internal/pkg/manager/manager_test.go index 5221a6b..5a7096c 100644 --- a/internal/pkg/manager/manager_test.go +++ b/internal/pkg/manager/manager_test.go @@ -185,10 +185,10 @@ func TestManagerHBTiming(t *testing.T) { hb := 100 pings := 10 - // expected time with some tolerance for other events - expected := time.Duration(pings*hb+5) * time.Millisecond + // expected time with tolerance for other logic and worst case rand timeout + expected := time.Duration(pings*hb+15) * time.Millisecond - go manager.HeartBeat(ch, hb, 0, time.Millisecond) + go manager.HeartBeat(ch, hb, 1, time.Millisecond) iter := 0 start := time.Now()