Change information
Commit message:
gopls/internal/cmd: fix flaky MCP test, disable Close() err logging
The MCPCommandLogging test was flaky because it did not wait for the notification that produced the "notifications/initialized" log. Instead, check for the "initialize" log, which is the request sent when the client attempts to connect to the MCP server.
Also, silence any errors from closing the connection by replacing t.Errorf with t.Logf. Based on the investigation (see https://github.com/golang/go/issues/77336#issuecomment-4090756198), there may be a bug in mcp causing a race condition that affects .Close().
MCP bug reported: https://github.com/modelcontextprotocol/go-sdk/issues/855
For golang/go#77336
Change-Id: I2cbed51cd2e65080dd4fffc519bbcad01eb676bd
Files:
- M gopls/internal/cmd/mcp_test.go
Change size: S
Delta: 1 file changed, 27 insertions(+), 8 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +2 by Alan Donovan
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI