test: add more tests (#1154)

This commit is contained in:
Kevin Wan
2021-10-21 21:16:18 +08:00
committed by GitHub
parent 5636bf4955
commit a6bdffd225

View File

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