mirror of https://github.com/golang/go.git
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> |
||
|---|---|---|
| .. | ||
| testdata/vulndb | ||
| call_hierarchy_test.go | ||
| configuration_test.go | ||
| debugserver_test.go | ||
| definition_test.go | ||
| embed_test.go | ||
| failures_test.go | ||
| fix_test.go | ||
| formatting_test.go | ||
| generate_test.go | ||
| highlight_test.go | ||
| hover_test.go | ||
| import_test.go | ||
| imports_test.go | ||
| link_test.go | ||
| misc_test.go | ||
| multiple_adhoc_test.go | ||
| references_test.go | ||
| rename_test.go | ||
| semantictokens_test.go | ||
| settings_test.go | ||
| shared_test.go | ||
| staticcheck_test.go | ||
| vendor_test.go | ||
| vuln_test.go | ||
| workspace_symbol_test.go | ||