From: Ian Lance Taylor Date: Thu, 5 Dec 2019 21:44:01 +0000 (-0800) Subject: runtime: add Gosched to TestSelectStackAdjust loop X-Git-Tag: go1.14beta1~55 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d2dec04056cfa33c70b7fc4a72fd3d98b78bf385;p=gostls13.git runtime: add Gosched to TestSelectStackAdjust loop Give the runtime more of a chance to do other work in a tight loop. Fixes #34693 Change-Id: I8df6173d2c93ecaccecf4520a6913b495787df78 Reviewed-on: https://go-review.googlesource.com/c/go/+/210217 Run-TryBot: Ian Lance Taylor Reviewed-by: Brad Fitzpatrick Reviewed-by: Bryan C. Mills TryBot-Result: Gobot Gobot --- diff --git a/src/runtime/chan_test.go b/src/runtime/chan_test.go index d4752dd344..039a086e9b 100644 --- a/src/runtime/chan_test.go +++ b/src/runtime/chan_test.go @@ -719,6 +719,7 @@ func TestSelectStackAdjust(t *testing.T) { if after.NumGC-before.NumGC >= 2 { goto done } + runtime.Gosched() } t.Fatal("failed to trigger concurrent GC") done: