Default draft protocol support: sessionless + handshake-less (SEP-2575 + SEP-2567) (#1610)

This commit is contained in:
Stephen Halter 2026-06-23 21:24:22 -07:00 • committed by GitHub
commit 6c323e783b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -188,7 +188,13 @@ public partial class McpServerBuilderExtensionsToolsTests : ClientServerTestBase
[Fact]
public async Task Can_Be_Notified_Of_Tool_Changes()
{
await using McpClient client = await CreateMcpClientForServer();
// Under the draft revision, list-changed notifications are delivered only over a
// subscriptions/listen stream (covered by SubscriptionsListenTests). This test pins the
// legacy revision to keep coverage of the session-wide broadcast that legacy clients still rely on.
await using McpClient client = await CreateMcpClientForServer(new McpClientOptions
{
ProtocolVersion = McpSession.LatestProtocolVersion,
});
var tools = await client.ListToolsAsync(cancellationToken: TestContext.Current.CancellationToken);
Assert.Equal(19, tools.Count);