test: add more tests (#1154)

master
Kevin Wan 3 years ago committed by GitHub
parent 5636bf4955
commit a6bdffd225
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -41,3 +41,10 @@ func TestFakeTicker(t *testing.T) {
assert.Nil(t, ticker.Wait(time.Second)) assert.Nil(t, ticker.Wait(time.Second))
assert.Equal(t, int32(total), atomic.LoadInt32(&count)) 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))
}

Loading…
Cancel
Save