Commit a0c1e8d1 authored by Ian Lance Taylor's avatar Ian Lance Taylor

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent ec10e6f3
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment