Add initial task extension conformance coverage (#1734)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7c99928c-a943-49f4-9a63-8b04a0e4d18b
This commit is contained in:
Pranav Senthilnathan 2026-07-24 17:16:20 -07:00 • committed by GitHub
commit 83523b0a42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -154,9 +154,10 @@ public class McpClientTaskMethodsTests : ClientServerTestBase
{
await client.CancelTaskAsync(taskId, ct);
// If cancel succeeded, verify the task is cancelled
// Cancellation is eventually consistent. The task may complete before the cancellation
// request wins the race, but the terminal-task cancellation acknowledgement is idempotent.
var taskResult = await client.GetTaskAsync(taskId, ct);
Assert.IsType<CancelledTaskResult>(taskResult);
Assert.True(taskResult is CancelledTaskResult or CompletedTaskResult);
}
catch (McpProtocolException)
{