(t *testing.T, f func(chan bool))
| 46 | } |
| 47 | |
| 48 | func test(t *testing.T, f func(chan bool)) { |
| 49 | t.Helper() |
| 50 | for i := 0; i < 1000; i++ { |
| 51 | timeout(f) |
| 52 | } |
| 53 | time.Sleep(time.Second * 2) |
| 54 | t.Log(runtime.NumGoroutine()) |
| 55 | } |
| 56 | |
| 57 | func TestBadTimeout(t *testing.T) { test(t, doBadthing) } |
| 58 | func TestGoodTimeout(t *testing.T) { test(t, doGoodthing) } |
no test coverage detected