go/internal/lsp/regtest
Bryan C. Mills c20fd7c261 internal/lsp/regtest: eliminate arbitrary timeouts
We care that gopls operations complete within a reasonable time.
However, what is “reasonable” depends strongly on the specifics of the
user and the hardware they are running on: a timeout that would be
perfectly reasonable on a high-powered user workstation with little
other load may be far too short on an overloaded and/or underpowered
CI builder.

This change adjusts the regtest runner to use the test deadline
instead of an arbitrary, flag-defined timeout; we expect the user or
system running the test to scale the test timeout appropriately to the
specific platform and system load.

When the testing package gains support for per-test timeouts
(golang/go#48157), this approach will automatically apply those
timeouts too.

If we decide that we also want to test specific performance and/or
latency targets, we can set up specific configurations for that (as
either aggressive per-test timeouts or benchmarks) in a followup
change.

For golang/go#50582

Change-Id: I1ab11b2049effb097aa620046fe11609269f91c4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/380497
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
2022-01-25 21:51:33 +00:00
..
doc.go internal/lsp: move gopls/internal/regtest -> internal/lsp/regtest 2021-04-23 16:19:37 +00:00
env.go internal/lsp/regtest: add a benchmark for didChange 2021-05-06 02:57:18 +00:00
env_test.go internal/lsp/regtest: add a benchmark for didChange 2021-05-06 02:57:18 +00:00
expectation.go internal/lsp/regtest: fix a panic TestResolveImportCycle 2021-07-09 17:21:04 +00:00
regtest.go internal/lsp/regtest: eliminate arbitrary timeouts 2022-01-25 21:51:33 +00:00
runner.go internal/lsp/regtest: eliminate arbitrary timeouts 2022-01-25 21:51:33 +00:00
wrappers.go /internal/lsp/source: apply directory filters to workspace symbols 2021-10-30 12:32:06 +00:00