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:
parent
ec10e6f364
commit
a0c1e8d1ab
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user