diff options
| author | Mateusz Poliwczak <mpoliwczak34@gmail.com> | 2026-04-09 21:05:54 +0200 |
|---|---|---|
| committer | Mateusz Poliwczak <mpoliwczak34@gmail.com> | 2026-04-09 14:02:10 -0700 |
| commit | cca91cc00c68d5c278901eeeb1b13a0691173e39 (patch) | |
| tree | 8008201146d34a9e13188e22eabaf59bd164078b | |
| parent | 6f4a698fd9064c1aa635da53df9e2772a8bf0e1c (diff) | |
| download | go-cca91cc00c68d5c278901eeeb1b13a0691173e39.tar.xz | |
testing: document T.Parallel pause-and-resume behavior
The behaviour seems important to be documented explicitly.
Change-Id: I9aabd0b85d2e5754d2bee4e5d8bcf8816a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/764840
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
| -rw-r--r-- | src/testing/testing.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/testing/testing.go b/src/testing/testing.go index f6ecd5b901..8b7742d85e 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -1905,9 +1905,10 @@ func pcToName(pc uintptr) string { const parallelConflict = `testing: test using t.Setenv, t.Chdir, or cryptotest.SetGlobalRandom can not use t.Parallel` // Parallel signals that this test is to be run in parallel with (and only with) -// other parallel tests. When a test is run multiple times due to use of -// -test.count or -test.cpu, multiple instances of a single test never run in -// parallel with each other. +// other parallel tests, and pauses until all non-parallel tests have finished. +// +// When a test is run multiple times due to use of -test.count or -test.cpu, +// multiple instances of a single test never run in parallel with each other. func (t *T) Parallel() { if t.isParallel { panic("testing: t.Parallel called multiple times") |
