diff --git a/gopls/internal/regtest/env.go b/gopls/internal/regtest/env.go index 322799d68c..3c41066024 100644 --- a/gopls/internal/regtest/env.go +++ b/gopls/internal/regtest/env.go @@ -282,8 +282,9 @@ func (e *Env) Await(expectations ...Expectation) { e.mu.Unlock() return case Unmeetable: + failure := fmt.Sprintf("unmeetable expectations:\n%s\nstate:\n%v", summary, e.state) e.mu.Unlock() - e.T.Fatalf("unmeetable expectations:\n%s\nstate:\n%v", summary, e.state) + e.T.Fatal(failure) } cond := &condition{ expectations: expectations,