Skip to content

Commit b9e2ef6

Browse files
committed
React to IClientTransport and McpClientFactoryChanges
1 parent 8ec4a36 commit b9e2ef6

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

tests/ModelContextProtocol.Tests/StdioServerIntegrationTests.cs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,8 @@ public async Task SigInt_DisposesTestServerWithHosting_Gracefully()
3434
process.StandardInput.BaseStream,
3535
serverName: "TestServerWithHosting");
3636

37-
var serverConfig = new McpServerConfig()
38-
{
39-
Id = "test-server-with-hosting",
40-
Name = "TestServerWithHosting",
41-
TransportType = TransportTypes.StdIo,
42-
};
43-
44-
await using var client = await McpClientFactory.CreateAsync(serverConfig,
45-
createTransportFunc: (_, _) => new TestClientTransport(streamServerTransport),
37+
await using var client = await McpClientFactory.CreateAsync(
38+
new TestClientTransport(streamServerTransport),
4639
loggerFactory: LoggerFactory,
4740
cancellationToken: TestContext.Current.CancellationToken);
4841

@@ -65,6 +58,8 @@ public async Task SigInt_DisposesTestServerWithHosting_Gracefully()
6558

6659
private sealed class TestClientTransport(ITransport sessionTransport) : IClientTransport
6760
{
61+
public string Name => nameof(TestClientTransport);
62+
6863
public Task<ITransport> ConnectAsync(CancellationToken cancellationToken = default)
6964
=> Task.FromResult(sessionTransport);
7065
}

0 commit comments

Comments
 (0)