aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Neil <dneil@google.com>2025-05-22 17:18:12 -0700
committerGopher Robot <gobot@golang.org>2025-05-29 10:29:01 -0700
commitc2f0fe5854bbae49327f8222098142ab6db74a99 (patch)
tree74b85897eac303316a83b94d629bf528d993c192
parentb170c7e94c478e616d194af95caa7747d9fa4725 (diff)
downloadgo-c2f0fe5854bbae49327f8222098142ab6db74a99.tar.xz
internal/synctest: speed up TestWeak
Run TestWeak for fewer iterations. Five is enough reproduce #73817, which was the motivation for this test. runtime.GC is ridiculously slow on wasm, and not especially fast anywhere else. Change-Id: Ieb5235d064b123cbc22a306425e385c273b54493 Reviewed-on: https://go-review.googlesource.com/c/go/+/675716 Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
-rw-r--r--src/internal/synctest/synctest_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/internal/synctest/synctest_test.go b/src/internal/synctest/synctest_test.go
index 8b2ade5630..2e1393591f 100644
--- a/src/internal/synctest/synctest_test.go
+++ b/src/internal/synctest/synctest_test.go
@@ -710,7 +710,7 @@ func TestHappensBefore(t *testing.T) {
// https://go.dev/issue/73817
func TestWeak(t *testing.T) {
synctest.Run(func() {
- for range 100 {
+ for range 5 {
runtime.GC()
b := make([]byte, 1024)
weak.Make(&b)