diff --git a/src/pkg/time/sleep_test.go b/src/pkg/time/sleep_test.go index 9908e220f0..1322f06114 100644 --- a/src/pkg/time/sleep_test.go +++ b/src/pkg/time/sleep_test.go @@ -60,10 +60,11 @@ func TestAfterStress(t *testing.T) { Sleep(Nanosecond) } }() - c := Tick(1) + ticker := NewTicker(1) for i := 0; i < 100; i++ { - <-c + <-ticker.C } + ticker.Stop() atomic.StoreUint32(&stop, 1) }