소스 검색

test: add more tests (#1154)

Kevin Wan 3 년 전
부모
커밋
a6bdffd225
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      core/timex/ticker_test.go

+ 7 - 0
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))
+}