]> Cypherpunks.ru repositories - gostls13.git/commit
testing: clarify rules for concurrent t.Run calls
authorAlberto Donizetti <alb.donizetti@gmail.com>
Thu, 1 Jun 2017 10:14:23 +0000 (12:14 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 29 Jun 2017 16:21:32 +0000 (16:21 +0000)
commit68e1b3e361b84ed7a4d5564e37a12a2c3d473283
treeb68f869d639e8b1f436dc3d3afc6da3d9568a460
parent6b8813ca4515cd558f12eb26582cdfd5909c9f3b
testing: clarify rules for concurrent t.Run calls

Apparently, "all such calls must happen" means that the t.Run call
must *return* before the outer test function returns, or the calls
will cause a data race on t.ran.

Clarify the docs.

Fixes #20339

Change-Id: I191a9af2a9095be1e0aaf10b79c30e00a9c495cb
Reviewed-on: https://go-review.googlesource.com/47150
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/testing/benchmark.go
src/testing/testing.go