]> Cypherpunks repositories - gostls13.git/commit
sync: set GOMAXPROCS to 1 in TestPoolGC
authorMichael Anthony Knyszek <mknyszek@google.com>
Fri, 16 May 2025 04:42:38 +0000 (04:42 +0000)
committerMichael Knyszek <mknyszek@google.com>
Fri, 16 May 2025 16:55:03 +0000 (09:55 -0700)
commite6cd9c083ec1a2d989608fd6b4d4809b8b08d0fe
treea8384412e87a85579d734f92d2048d2f2a2165fb
parent2b3794e3e8a0ecf9d0ff7d8689ca9cdaea974e08
sync: set GOMAXPROCS to 1 in TestPoolGC

This test expects to be able to drain a Pool using only Get. This isn't
actually possible in the general case, since a pooled value could get
stuck in some P's private slot. However, if GOMAXPROCS=1, there's only 1
P we could be running on, so getting stuck becomes impossible.

This test isn't checking any concurrent properties of Pool, so this is
fine. Just set GOMAXPROCS=1 for this one particular test.

Fixes #73728.

Change-Id: I9053e28118060650f2cd7d0d58f5a86d630b36f7
Reviewed-on: https://go-review.googlesource.com/c/go/+/673375
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/sync/pool_test.go