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>
}
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)