We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2faad08 commit 4afd149Copy full SHA for 4afd149
coderd/mcp/mcp_e2e_test.go
@@ -1240,13 +1240,13 @@ func TestMCPHTTP_E2E_ChatGPTEndpoint(t *testing.T) {
1240
"Authorization": "Bearer " + coderClient.SessionToken(),
1241
}))
1242
require.NoError(t, err)
1243
- defer func() {
+ t.Cleanup(func() {
1244
if closeErr := mcpClient.Close(); closeErr != nil {
1245
t.Logf("Failed to close MCP client: %v", closeErr)
1246
}
1247
- }()
+ })
1248
1249
- ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong)
+ ctx, cancel := context.WithTimeout(t.Context(), testutil.WaitLong)
1250
defer cancel()
1251
1252
// Start client
0 commit comments