Follow-ups to #1610: de-draft 2026-07-28 terminology, renumber error codes, ProtocolVersion floor (#1671)

This commit is contained in:
Stephen Halter 2026-06-25 14:07:52 -07:00 • committed by GitHub
commit d6b1615988
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,4 +1,4 @@
using Microsoft.Extensions.AI;
using Microsoft.Extensions.AI;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
@ -188,12 +188,12 @@ public partial class McpServerBuilderExtensionsToolsTests : ClientServerTestBase
[Fact]
public async Task Can_Be_Notified_Of_Tool_Changes()
{
// Under the draft revision, list-changed notifications are delivered only over a
// Under the 2026-07-28 protocol, 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,
ProtocolVersion = McpHttpHeaders.November2025ProtocolVersion,
});
var tools = await client.ListToolsAsync(cancellationToken: TestContext.Current.CancellationToken);