From 80f3bb5516bb12233a15167bc8ba9d39cca5b535 Mon Sep 17 00:00:00 2001 From: Michael Anthony Knyszek Date: Thu, 9 Oct 2025 21:13:59 +0000 Subject: [PATCH] reflect: remove timeout in TestChanOfGC This test has an arbitrary 5 second timeout, and this seems to fire on Darwin with mayMoreStackMove enabled (which is slow). Just rely on the regular test timeout instead of this arbitrary shorter timeout to eliminate the possibility that the test is just too slow. On my Linux VM, I can get this test to take up to 2 seconds with mayMoreStackMove set on all the same packages dist does, so this failure mode is actually plausible. Fixes #75742. Change-Id: Iebcc859cab26e9205b57b869690162a9a424dfce Reviewed-on: https://go-review.googlesource.com/c/go/+/710618 Reviewed-by: Cherry Mui LUCI-TryBot-Result: Go LUCI Auto-Submit: Michael Knyszek --- src/reflect/all_test.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/reflect/all_test.go b/src/reflect/all_test.go index 2a8c520662..c6610b1968 100644 --- a/src/reflect/all_test.go +++ b/src/reflect/all_test.go @@ -6198,19 +6198,6 @@ func TestChanOfDir(t *testing.T) { } func TestChanOfGC(t *testing.T) { - done := make(chan bool, 1) - go func() { - select { - case <-done: - case <-time.After(5 * time.Second): - panic("deadlock in TestChanOfGC") - } - }() - - defer func() { - done <- true - }() - type T *uintptr tt := TypeOf(T(nil)) ct := ChanOf(BothDir, tt) -- 2.52.0