Add client completion notification and details (#1368)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Stephen Toub 2026-03-02 09:17:22 -05:00 • committed by GitHub
commit b965a7eca6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -794,4 +794,17 @@ public class McpClientTests : ClientServerTestBase
Assert.NotNull(response);
Assert.NotNull(response.Result);
}
[Fact]
public async Task Completion_GracefulDisposal_CompletesWithNoException()
{
var client = await CreateMcpClientForServer();
Assert.False(client.Completion.IsCompleted);
await client.DisposeAsync();
Assert.True(client.Completion.IsCompleted);
var details = await client.Completion;
Assert.Null(details.Exception);
}
}