]> Cypherpunks repositories - gostls13.git/commitdiff
reflect: remove timeout in TestChanOfGC
authorMichael Anthony Knyszek <mknyszek@google.com>
Thu, 9 Oct 2025 21:13:59 +0000 (21:13 +0000)
committerMichael Knyszek <mknyszek@google.com>
Thu, 9 Oct 2025 21:34:31 +0000 (14:34 -0700)
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 <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Knyszek <mknyszek@google.com>

src/reflect/all_test.go

index 2a8c5206624146966d5830bc8c6bc6ac0e6ca38b..c6610b1968a83475bb3160793fb145046a3712b6 100644 (file)
@@ -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)