• Brad Fitzpatrick's avatar
    testing: add T.Context method · 26827bc2
    Brad Fitzpatrick authored
    From the doc comment:
    
    Context returns the context for the current test or benchmark.
    The context is cancelled when the test or benchmark finishes.
    A goroutine started during a test or benchmark can wait for the
    context's Done channel to become readable as a signal that the
    test or benchmark is over, so that the goroutine can exit.
    
    Fixes #16221.
    Fixes #17552.
    
    Change-Id: I657df946be2c90048cc74615436c77c7d9d1226c
    Reviewed-on: https://go-review.googlesource.com/31724Reviewed-by: 's avatarRob Pike <r@golang.org>
    26827bc2
Name
Last commit
Last update
..
internal/testdeps Loading commit data...
iotest Loading commit data...
quick Loading commit data...
allocs.go Loading commit data...
allocs_test.go Loading commit data...
benchmark.go Loading commit data...
benchmark_test.go Loading commit data...
cover.go Loading commit data...
example.go Loading commit data...
export_test.go Loading commit data...
match.go Loading commit data...
match_test.go Loading commit data...
sub_test.go Loading commit data...
testing.go Loading commit data...
testing_test.go Loading commit data...