Skip to content

Commit

Permalink
gopls/internal/regtest: unskip TestDeleteModule_Interdependent
Browse files Browse the repository at this point in the history
Reloading has been significantly refactored recently. Unskip this test
to see if it flakes:
 - If it does not flake, that is a useful signal.
 - If it does flake, that is also a useful signal.

Notably, following CL 419500 we allow network when reloading the
workspace, and so do not need to apply quick-fixes in order to download
the new module from the proxy.

For golang/go#46375
For golang/go#53878

Change-Id: Idde7195730c32bdb434a26b28aac82649dd1b5ac
Reviewed-on: https://go-review.googlesource.com/c/tools/+/422910
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Peter Weinberger <pjw@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
  • Loading branch information
findleyr committed Aug 15, 2022
1 parent e8507be commit 938e162
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions gopls/internal/regtest/workspace/workspace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,6 @@ func main() {
// This change tests that the version of the module used changes after it has
// been deleted from the workspace.
func TestDeleteModule_Interdependent(t *testing.T) {
t.Skip("Skipping due to golang/go#46375: race due to orphaned file reloading")

const multiModule = `
-- moda/a/go.mod --
module a.com
Expand Down Expand Up @@ -353,15 +351,6 @@ func Hello() int {
env.DoneWithChangeWatchedFiles(),
)

d := protocol.PublishDiagnosticsParams{}
env.Await(
OnceMet(
env.DiagnosticAtRegexpWithMessage("moda/a/go.mod", "require b.com v1.2.3", "b.com@v1.2.3 has not been downloaded"),
ReadDiagnostics("moda/a/go.mod", &d),
),
)
env.ApplyQuickFixes("moda/a/go.mod", d.Diagnostics)
env.Await(env.DoneWithChangeWatchedFiles())
got, _ := env.GoToDefinition("moda/a/a.go", env.RegexpSearch("moda/a/a.go", "Hello"))
if want := "b.com@v1.2.3/b/b.go"; !strings.HasSuffix(got, want) {
t.Errorf("expected %s, got %v", want, got)
Expand Down

0 comments on commit 938e162

Please sign in to comment.