]> Cypherpunks repositories - gostls13.git/commit
testing: add TB.SetGOMAXPROCS function
authorsivchari <shibuuuu5@gmail.com>
Mon, 26 Feb 2024 06:08:13 +0000 (15:08 +0900)
committerGopher Robot <gobot@golang.org>
Thu, 21 Mar 2024 20:26:36 +0000 (20:26 +0000)
commit5d29578fd54d5774ff0ecbe2b1407317bf64ead8
tree5219ff217cbf66582cc27f07f7053fc8d81de58e
parent0ae8468b204e454314c0f35411b15dc03c89ad30
testing: add TB.SetGOMAXPROCS function

Add a new method TB.SetGOMAXPROCS which sets variable of GOMAXPROCS.
This method aims to set a variable for the isolated lifetime of the test and cleans up.
And unset this when the test ends.
This method disables the test or benchmark from running in
parallel.

Fixes: #62020
Change-Id: Iae44109d0def35cc47049c3ca4cd5306173d52ee
Signed-off-by: sivchari <shibuuuu5@gmail.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/519235
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
api/next/62020.txt [new file with mode: 0644]
doc/next/6-stdlib/99-minor/testing/62020.md [new file with mode: 0644]
src/testing/testing.go
src/testing/testing_test.go