(t *testing.T)
| 8 | ) |
| 9 | |
| 10 | func TestRawTicker(t *testing.T) { |
| 11 | if !testutils.IsSingleTesting() { |
| 12 | return |
| 13 | } |
| 14 | |
| 15 | var ticker = time.NewTicker(2 * time.Second) |
| 16 | go func() { |
| 17 | for range ticker.C { |
| 18 | t.Log("tick") |
| 19 | } |
| 20 | t.Log("stop") |
| 21 | }() |
| 22 | |
| 23 | time.Sleep(6 * time.Second) |
| 24 | ticker.Stop() |
| 25 | time.Sleep(1 * time.Second) |
| 26 | } |
| 27 | |
| 28 | func TestTicker(t *testing.T) { |
| 29 | if !testutils.IsSingleTesting() { |
nothing calls this directly
no test coverage detected