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

@ -162,7 +162,14 @@ public partial class McpServerBuilderExtensionsResourcesTests : ClientServerTest
[Fact]
public async Task Can_Be_Notified_Of_Resource_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 resources = await client.ListResourcesAsync(cancellationToken: TestContext.Current.CancellationToken);
Assert.Equal(7, resources.Count);