Use TimeToLive (TimeSpan?) instead of TtlMs (long?) in public APIs (#1644)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: PranavSenthilnathan <12225508+PranavSenthilnathan@users.noreply.github.com> Co-authored-by: halter73 <54385+halter73@users.noreply.github.com> Co-authored-by: Pranav Senthilnathan <pranas@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
9ba1f47d77
commit
3368bb7349
2 changed files with 30 additions and 85 deletions
|
|
@ -55,13 +55,13 @@ public class InMemoryMcpTaskStoreTests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public async Task CreateTaskAsync_UsesDefaultTtl()
|
||||
public async Task CreateTaskAsync_UsesDefaultTimeToLive()
|
||||
{
|
||||
var store = new InMemoryMcpTaskStore { DefaultTtlMs = 30000 };
|
||||
var store = new InMemoryMcpTaskStore { DefaultTimeToLive = TimeSpan.FromSeconds(30) };
|
||||
|
||||
var result = await store.CreateTaskAsync(CT);
|
||||
|
||||
Assert.Equal(30000, result.TtlMs);
|
||||
Assert.Equal(TimeSpan.FromSeconds(30), result.TimeToLive);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public class TaskCancellationIntegrationTests : ClientServerTestBase
|
|||
options.TaskStore = new InMemoryMcpTaskStore
|
||||
{
|
||||
DefaultPollIntervalMs = 50,
|
||||
DefaultTtlMs = 5000,
|
||||
DefaultTimeToLive = TimeSpan.FromSeconds(5),
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue