Skip to content

Commit 462b78f

Browse files
committed
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 <bcmills@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
1 parent 055113e commit 462b78f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

misc/cgo/test/setgid2_linux.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ import (
2020
)
2121

2222
func testSetgidStress(t *testing.T) {
23-
var N = 1000
24-
if testing.Short() {
25-
N = 50
26-
}
23+
const N = 50
2724
ch := make(chan int, N)
2825
for i := 0; i < N; i++ {
2926
go func() {

0 commit comments

Comments
 (0)