From a6bdffd22560837d6861b2bee45cdb7bf6c82c4a Mon Sep 17 00:00:00 2001 From: Kevin Wan Date: Thu, 21 Oct 2021 21:16:18 +0800 Subject: [PATCH] test: add more tests (#1154) --- core/timex/ticker_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/timex/ticker_test.go b/core/timex/ticker_test.go index 3acaf4e0..66c0dcec 100644 --- a/core/timex/ticker_test.go +++ b/core/timex/ticker_test.go @@ -41,3 +41,10 @@ func TestFakeTicker(t *testing.T) { assert.Nil(t, ticker.Wait(time.Second)) assert.Equal(t, int32(total), atomic.LoadInt32(&count)) } + +func TestFakeTickerTimeout(t *testing.T) { + ticker := NewFakeTicker() + defer ticker.Stop() + + assert.NotNil(t, ticker.Wait(time.Millisecond)) +}