Skip to content

Commit

Permalink
os/signal: special-case test settle time on the solaris-amd64-oracler…
Browse files Browse the repository at this point in the history
…el 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]>
  • Loading branch information
Bryan C. Mills committed Apr 15, 2020
1 parent 3567f71 commit aa3413c
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/os/signal/signal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,25 @@ import (
// on heavily loaded systems.
//
// The current value is set based on flakes observed in the Go builders.
var settleTime = 250 * time.Millisecond
var settleTime = 100 * time.Millisecond

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

0 comments on commit aa3413c

Please sign in to comment.