mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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 <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
3567f71b45
commit
aa3413cd98
1 changed files with 17 additions and 2 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue