fix recursion

This commit is contained in:
Ethan Buchman
2017-12-25 11:10:48 -05:00
parent 76433d9040
commit 558f8e7769
2 changed files with 8 additions and 3 deletions

View File

@@ -7,8 +7,12 @@ import (
"github.com/stretchr/testify/assert"
)
// NOTE: this only tests with the LogicalTicker.
// How do you test a real-clock ticker properly?
func TestDefaultTicker(t *testing.T) {
ticker := defaultTickerMaker(time.Millisecond * 10)
<-ticker.Chan()
ticker.Stop()
}
func TestRepeat(t *testing.T) {
ch := make(chan time.Time, 100)