(t *testing.T, v *time.Duration, d time.Duration)
| 339 | } |
| 340 | |
| 341 | func testReplaceTimeout(t *testing.T, v *time.Duration, d time.Duration) { |
| 342 | t.Helper() |
| 343 | if isParallel(t) { |
| 344 | t.Fatal("cannot replace timeout in parallel test") |
| 345 | } |
| 346 | old := *v |
| 347 | *v = d |
| 348 | t.Cleanup(func() { *v = old }) |
| 349 | } |
| 350 | |
| 351 | func isParallel(t *testing.T) (ret bool) { |
| 352 | t.Helper() |
no test coverage detected