Change wakeup timeout to 60s

This commit is contained in:
andig 2022-02-01 08:37:59 +01:00
parent d0ae646e46
commit 307c9062b4
2 changed files with 3 additions and 3 deletions

View file

@ -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 {

View file

@ -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