1
0
mirror of https://github.com/golang/go synced 2024-11-18 14:54:40 -07:00

internal/lsp/regtest: increase test timeout to 60s

In golang.org/issues/37318, it appears that the regtests are
occasionally timing out on the builders. I'm not sure why they're
running so slowly, but as a temporary measure lets increase the test
timeout to hopefully eliminate flakes.

Updates golang/go#37318

Change-Id: Id9c854ea518c9dc3618ea2b521fe6133e71af8b2
Reviewed-on: https://go-review.googlesource.com/c/tools/+/220280
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Rohan Challa <rohan@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Rob Findley 2020-02-20 10:33:58 -05:00 committed by Robert Findley
parent 2086a0a691
commit 947cbf1911

View File

@ -44,6 +44,7 @@ func TestMain(m *testing.M) {
// We don't want our forwarders to exit, but it's OK if they would have.
lsprpc.ForwarderExitFunc = func(code int) {}
const testTimeout = 60 * time.Second
if *runSubprocessTests {
goplsPath := *goplsBinaryPath
if goplsPath == "" {
@ -53,9 +54,9 @@ func TestMain(m *testing.M) {
panic(fmt.Sprintf("finding test binary path: %v", err))
}
}
runner = NewTestRunner(NormalModes|SeparateProcess, 30*time.Second, goplsPath)
runner = NewTestRunner(NormalModes|SeparateProcess, testTimeout, goplsPath)
} else {
runner = NewTestRunner(NormalModes, 30*time.Second, "")
runner = NewTestRunner(NormalModes, testTimeout, "")
}
code := m.Run()
runner.Close()