Add client completion notification and details (#1368)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
4af2596019
commit
b965a7eca6
1 changed files with 691 additions and 31 deletions
|
|
@ -303,4 +303,19 @@ public abstract class HttpServerIntegrationTests : LoggedTest, IClassFixture<Sse
|
|||
Assert.Equal($"Echo: Hello MCP! {i}", textContent.Text);
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Completion_GracefulDisposal_ReturnsCompletionDetails()
|
||||
{
|
||||
var client = await GetClientAsync();
|
||||
Assert.False(client.Completion.IsCompleted);
|
||||
|
||||
await client.DisposeAsync();
|
||||
Assert.True(client.Completion.IsCompleted);
|
||||
|
||||
var details = await client.Completion;
|
||||
var httpDetails = Assert.IsType<HttpClientCompletionDetails>(details);
|
||||
Assert.Null(httpDetails.Exception);
|
||||
Assert.Null(httpDetails.HttpStatusCode);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue