From 98f05093638728e7c57c48f14ab4d56076118836 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Fri, 15 Sep 2023 10:56:32 -0400 Subject: [PATCH] runtime: remove an arbitrary timeout in TestProfBuf The failure observed in https://build.golang.org/log/766ad55d098ee1979ba1ae261e0813063567743e appears to be spurious. If it is, this change will fix it. If it is not, and somehow the Read has deadlocked, then this change will help to diagnose it (by causing the test to time out and dump its running goroutines). For #56196. Change-Id: Ic74f018384a64e95566a5b5d8126cbd59ab5e5fa Reviewed-on: https://go-review.googlesource.com/c/go/+/528399 LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Pratt Auto-Submit: Bryan Mills --- src/runtime/profbuf_test.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/runtime/profbuf_test.go b/src/runtime/profbuf_test.go index d9c5264b73..dac78ffd31 100644 --- a/src/runtime/profbuf_test.go +++ b/src/runtime/profbuf_test.go @@ -39,13 +39,7 @@ func TestProfBuf(t *testing.T) { c <- 1 }() time.Sleep(10 * time.Millisecond) // let goroutine run and block - return func() { - select { - case <-c: - case <-time.After(1 * time.Second): - t.Fatalf("timeout waiting for blocked read") - } - } + return func() { <-c } } readEOF := func(t *testing.T, b *ProfBuf) { rdata, rtags, eof := b.Read(ProfBufBlocking) -- 2.50.0