go/internal
Robert Findley 96d05aa120 gopls/internal/regtest: fix TestFailingDiagnosticClearingOnEdit
This test was asserting immediately on the non-presence of published
diagnostics, and therefore was racing with the diagnostics calculation
pass. Following https://go.dev/cl/420539 this became a flake, because
once gopls has calculated diagnostics for the open event, it will
actually publish empty diagnostics for the opened file.

Update the test to use a OnceMet so that we only evaluate the
expectation once we've finished the diagnostics pass. As a result, the
test deterministically failed, which was fixed by using the
EmptyOrNoDiagnostics expectation.

Fixes golang/go#54271

Change-Id: Id3f220ce44c7996132699a724b6c627f034e367f
Reviewed-on: https://go-review.googlesource.com/c/tools/+/422136
gopls-CI: kokoro <noreply+kokoro@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Peter Weinberger <pjw@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-08-09 15:36:31 +00:00
..
analysisinternal internal/analysisinternal: move FindBestMatch to internal/lsp/fuzzy 2022-07-13 21:41:37 +00:00
apidiff all: gofmt 2022-04-12 17:53:17 +00:00
event all: gofmt 2022-04-12 17:53:17 +00:00
fakenet
fastwalk all: gofmt 2022-04-12 17:53:17 +00:00
gocommand internal/gocommand: skip ill-formed env vars in cmdDebugStr 2022-05-25 15:29:25 +00:00
gopathwalk internal/gopathwalk: remove unnecessary call to os.Lstat 2022-03-31 05:33:07 +00:00
imports internal/lsp: use directoryFilters in import scanning 2022-08-04 15:50:11 +00:00
jsonrpc2 gopls/internal/regtest/bench: refactor and improve benchmarks 2022-08-04 14:58:59 +00:00
jsonrpc2_v2 internal/jsonrpc2*: remove usage of golang.org/x/xerrors 2022-04-20 16:10:40 +00:00
lsp gopls/internal/regtest: fix TestFailingDiagnosticClearingOnEdit 2022-08-09 15:36:31 +00:00
memoize internal/memoize: fix race in Store.Promise 2022-07-28 15:35:11 +00:00
packagesinternal x/tools/go/packages: on Go 1.19+, explicitly ask for -json fields needed 2022-04-19 17:08:06 +00:00
persistent internal/lsp/cache: use GetHandle not Bind for 5 URI-keyed maps 2022-07-07 16:57:02 +00:00
proxydir
span internal/lsp: update the broken workspace message to mention go.work 2022-08-08 18:10:56 +00:00
stack all: gofmt 2022-04-12 17:53:17 +00:00
testenv internal: remove pre-go1.12 conditionally compiled files 2022-05-05 16:48:28 +00:00
tool internal/tool: implement structured help command 2022-05-04 22:58:41 +00:00
typeparams Revert "internal: temporarily disable tests so we can land CL 410955" 2022-06-08 01:09:07 +00:00
typesinternal internal/typesinternal: update typesinternal for 1.18 2022-02-22 16:42:18 +00:00
xcontext