From 307c9062b4f3e0d91603cdc186f0bce4052d02a2 Mon Sep 17 00:00:00 2001 From: andig Date: Tue, 1 Feb 2022 08:37:59 +0100 Subject: [PATCH] Change wakeup timeout to 60s --- core/timer.go | 2 +- core/timer_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/timer.go b/core/timer.go index d34889e85..a92be6136 100644 --- a/core/timer.go +++ b/core/timer.go @@ -7,7 +7,7 @@ import ( "github.com/benbjohnson/clock" ) -const wakeupTimeout = 30 * time.Second +const wakeupTimeout = 60 * time.Second // Timer measures active time between start and stop events type Timer struct { diff --git a/core/timer_test.go b/core/timer_test.go index 3d953f86f..253e295e4 100644 --- a/core/timer_test.go +++ b/core/timer_test.go @@ -16,11 +16,11 @@ func TestTimer(t *testing.T) { // start at.Start() - clck.Add(20 * time.Second) + clck.Add(10 * time.Second) require.Equal(t, at.Expired(), false) // wait another 20 sec to expire the timer - this will reset the timer as well - clck.Add(20 * time.Second) + clck.Add(wakeupTimeout + 10*time.Second) require.Equal(t, at.Expired(), true) // start