Ensure all test client instances are cleaned up (#3)

This commit is contained in:
Stephen Toub 2025-03-19 17:27:49 -04:00 • committed by GitHub
commit 555933a06e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -65,7 +65,7 @@ public class McpClientFactoryTests
};
// Act
var client = await McpClientFactory.CreateAsync(
await using var client = await McpClientFactory.CreateAsync(
serverConfig,
_defaultOptions,
(_, __) => new NopTransport());
@ -88,7 +88,7 @@ public class McpClientFactoryTests
};
// Act
var client = await McpClientFactory.CreateAsync(
await using var client = await McpClientFactory.CreateAsync(
serverConfig,
_defaultOptions,
(_, __) => new NopTransport());
@ -111,7 +111,7 @@ public class McpClientFactoryTests
};
// Act
var client = await McpClientFactory.CreateAsync(
await using var client = await McpClientFactory.CreateAsync(
serverConfig,
_defaultOptions,
(_, __) => new NopTransport());
@ -141,7 +141,7 @@ public class McpClientFactoryTests
};
// Act
var client = await McpClientFactory.CreateAsync(
await using var client = await McpClientFactory.CreateAsync(
serverConfig,
_defaultOptions,
(_, __) => new NopTransport());