зеркало из https://github.com/golang/tools.git
gopls/internal/test: await quiescence in TestInconsistentVendoring
TestInconsistentVendoring was awaiting only the initial workspace load before capturing diagnostics and running their code action. But opening a/a1.go also triggers diagnostics. This can cause the file lock failures observed in golang/go#64229. To fix this, wait for the change (the didOpen) to be fully processed. Fixes golang/go#64229 Change-Id: I747ea22db02b8def4bf7764714db7f901891792d Reviewed-on: https://go-review.googlesource.com/c/tools/+/558076 Reviewed-by: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Robert Findley <rfindley@google.com>
This commit is contained in:
Родитель
df2fa1e998
Коммит
8174727b3a
|
@ -51,8 +51,7 @@ func _() {
|
|||
).Run(t, pkgThatUsesVendoring, func(t *testing.T, env *Env) {
|
||||
env.OpenFile("a/a1.go")
|
||||
d := &protocol.PublishDiagnosticsParams{}
|
||||
env.OnceMet(
|
||||
InitialWorkspaceLoad,
|
||||
env.AfterChange(
|
||||
Diagnostics(env.AtRegexp("go.mod", "module mod.com"), WithMessage("Inconsistent vendoring")),
|
||||
ReadDiagnostics("go.mod", d),
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче