Add more tests (#51)
* Add more tests * Fix some code smells * Remove more code smells * Combine "ServerIntegrationTests" and "ClientIntegrationTests" because both are client integration tests just using different servers * Clean up resources after test * Improve kill logic for spawned child processes * Improved testability for Stdio * Fix SseIntegration tests
This commit is contained in:
parent
fe632617dc
commit
b5076263d1
1 changed files with 883 additions and 751 deletions
|
|
@ -86,9 +86,10 @@ public sealed class McpSessionScope : IAsyncDisposable
|
|||
McpClientOptions? options,
|
||||
ILoggerFactory? loggerFactory = null)
|
||||
{
|
||||
var factory = new McpClientFactory([config],
|
||||
using var factory = new McpClientFactory([config],
|
||||
options ?? new() { ClientInfo = new() { Name = "AnonymousClient", Version = "1.0.0.0" } },
|
||||
loggerFactory ?? NullLoggerFactory.Instance);
|
||||
factory.DisposeClientsOnDispose = false;
|
||||
var client = await factory.GetClientAsync(config.Id).ConfigureAwait(false);
|
||||
_clients.Add(client);
|
||||
return client;
|
||||
|
|
|
|||
Loading…
Reference in a new issue