Skip to content

Commit aa3413c

Browse files
author
Bryan C. Mills
committed
os/signal: special-case test settle time on the solaris-amd64-oraclerel builder
This is an attempt to distinguish between a dropped signal and general builder slowness. The previous attempt (increasing the settle time to 250ms) still resulted in a timeout: https://build.golang.org/log/dd62939f6d3b512fe3e6147074a9c6db1144113f For #33174 Change-Id: I79027e91ba651f9f889985975f38c7b01d82f634 Reviewed-on: https://go-review.googlesource.com/c/go/+/228266 Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 3567f71 commit aa3413c

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

src/os/signal/signal_test.go

+17-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,25 @@ import (
2727
// on heavily loaded systems.
2828
//
2929
// The current value is set based on flakes observed in the Go builders.
30-
var settleTime = 250 * time.Millisecond
30+
var settleTime = 100 * time.Millisecond
3131

3232
func init() {
33-
if s := os.Getenv("GO_TEST_TIMEOUT_SCALE"); s != "" {
33+
if testenv.Builder() == "solaris-amd64-oraclerel" {
34+
// The solaris-amd64-oraclerel builder has been observed to time out in
35+
// TestNohup even with a 250ms settle time.
36+
//
37+
// Use a much longer settle time on that builder to try to suss out whether
38+
// the test is flaky due to builder slowness (which may mean we need a
39+
// longer GO_TEST_TIMEOUT_SCALE) or due to a dropped signal (which may
40+
// instead need a test-skip and upstream bug filed against the Solaris
41+
// kernel).
42+
//
43+
// This constant is chosen so as to make the test as generous as possible
44+
// while still reliably completing within 3 minutes in non-short mode.
45+
//
46+
// See https://golang.org/issue/33174.
47+
settleTime = 11 * time.Second
48+
} else if s := os.Getenv("GO_TEST_TIMEOUT_SCALE"); s != "" {
3449
if scale, err := strconv.Atoi(s); err == nil {
3550
settleTime *= time.Duration(scale)
3651
}

0 commit comments

Comments
 (0)