From: Cherry Mui Date: Wed, 27 Jul 2022 16:59:16 +0000 (-0400) Subject: misc/cgo/test: use fewer threads in TestSetgidStress in long mode X-Git-Tag: go1.19~3^2~9 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=462b78fe7027ef0d2e2b40c3cfd1f5a37d307310;p=gostls13.git misc/cgo/test: use fewer threads in TestSetgidStress in long mode TestSetgidStress originally spawns 1000 threads for stress testing. It caused timeout on some builders so CL 415677 reduced to 50 in short mode. But it still causes flaky timeouts in longtest builders, so reduce the number of threads in long mode as well. Should fix #53641. Change-Id: I02f4ef8a143bb1faafe3d11ad223f36f5cc245c6 Reviewed-on: https://go-review.googlesource.com/c/go/+/419453 Reviewed-by: Bryan Mills Run-TryBot: Cherry Mui TryBot-Result: Gopher Robot --- diff --git a/misc/cgo/test/setgid2_linux.go b/misc/cgo/test/setgid2_linux.go index 9069cff334..438f5ae512 100644 --- a/misc/cgo/test/setgid2_linux.go +++ b/misc/cgo/test/setgid2_linux.go @@ -20,10 +20,7 @@ import ( ) func testSetgidStress(t *testing.T) { - var N = 1000 - if testing.Short() { - N = 50 - } + const N = 50 ch := make(chan int, N) for i := 0; i < N; i++ { go func() {