Skip to content

Commit

Permalink
misc/cgo/test: use fewer threads in TestSetgidStress in long mode
Browse files Browse the repository at this point in the history
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 <[email protected]>
Run-TryBot: Cherry Mui <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
  • Loading branch information
cherrymui committed Jul 27, 2022
1 parent 055113e commit 462b78f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions misc/cgo/test/setgid2_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 462b78f

Please sign in to comment.