You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
testing: the overview documentation on (*T) Run is unclear #35824
// Run does not return until parallel subtests have completed
But that means that in the example above (see below) the tests aren't run in parallel, because "Run does not return", which I take to mean that the first Run blocks (and then the second too, etc):
Run runs f as a subtest of t called name. It runs f in a separate goroutine and blocks until f returns or calls t.Parallel to become a parallel test. Run reports whether f succeeded (or at least did not fail before calling t.Parallel).
Run may be called simultaneously from multiple goroutines, but all such calls must return before the outer test function for t returns.
Activity
toothrot commentedon Nov 26, 2019
@opennota I feel like the documentation for T.Run itself is fairly clear on this behavior:
https://pkg.go.dev/testing?tab=doc#T.Run
Do you have a suggestion for improving this?
Also, if you're curious, you can see the
gorunning the tests here: https://github.com/golang/go/blob/go1.13.4/src/testing/testing.go#L960[-]testing: the documentation on Run is unclear[/-][+]testing: the overview documentation on (*T) Run is unclear[/+]toothrot commentedon Nov 27, 2019
/cc @mpvl @josharian