1
0
mirror of https://github.com/golang/go synced 2024-11-18 02:14:45 -07:00

context: mark testDeadline as a testing helper method

Change-Id: Ie6fc3e9789aea6e5949e66186db6f2b071b6fdff
Reviewed-on: https://go-review.googlesource.com/c/go/+/204037
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Ian Lance Taylor 2019-10-29 06:39:01 -07:00
parent ec10e6f364
commit a0c1e8d1ab

View File

@ -253,6 +253,7 @@ func XTestChildFinishesFirst(t testingT) {
}
func testDeadline(c Context, name string, failAfter time.Duration, t testingT) {
t.Helper()
select {
case <-time.After(failAfter):
t.Fatalf("%s: context should have timed out", name)