[tools] gopls/test/integration/mist: Fix flaky test

0 views
Skip to first unread message

Peter Weinberger (Gerrit)

unread,
Jun 29, 2026, 8:54:47 PM (2 days ago) Jun 29
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Alan Donovan, Hongxiang Jiang, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com

Peter Weinberger submitted the change

Change information

Commit message:
gopls/test/integration/mist: Fix flaky test

Test61208 in imports_test.go is flaky because the module index does
not always exist when the test tries to read it. This is fixed by
explicitly making sure the index exists. Otherwise the index is
created by a background goroutine when the View is initialized, and
occasionally it would seem that the goroutine doesn't complete in time.
Fixes: golang/go#78680
Change-Id: I61f012aa2fb236347c788f52a239f7c37231abe6
Reviewed-by: Alan Donovan <adon...@google.com>
Files:
  • M gopls/internal/test/integration/misc/imports_test.go
Change size: S
Delta: 1 file changed, 8 insertions(+), 41 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: I61f012aa2fb236347c788f52a239f7c37231abe6
Gerrit-Change-Number: 795040
Gerrit-PatchSet: 3
Gerrit-Owner: Peter Weinberger <p...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Hongxiang Jiang <hxj...@golang.org>
Gerrit-Reviewer: Peter Weinberger <p...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages