From: Bryan C. Mills Date: Fri, 15 Sep 2023 14:56:32 +0000 (-0400) Subject: runtime: remove an arbitrary timeout in TestProfBuf X-Git-Tag: go1.22rc1~815 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=98f05093638728e7c57c48f14ab4d56076118836;p=gostls13.git 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 --- 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)