Bring up to 0.1.13 conformance (#1254)
This commit is contained in:
parent
9c1538fd98
commit
27b5eb8031
1 changed files with 1249 additions and 78 deletions
|
|
@ -70,7 +70,9 @@ public class TaskCancellationIntegrationTests : ClientServerTestBase
|
|||
{
|
||||
Name = "long-running-tool",
|
||||
Arguments = EmptyArguments(),
|
||||
Task = new McpTaskMetadata { TimeToLive = TimeSpan.FromMilliseconds(200) }
|
||||
// Use a TTL long enough that thread pool scheduling delays on loaded CI machines
|
||||
// don't cause the CTS to fire before the tool lambda begins executing.
|
||||
Task = new McpTaskMetadata { TimeToLive = TimeSpan.FromSeconds(5) }
|
||||
},
|
||||
cancellationToken: TestContext.Current.CancellationToken);
|
||||
|
||||
|
|
@ -333,13 +335,16 @@ public class TaskCancellationConcurrencyTests : ClientServerTestBase
|
|||
RegisterMarker("short-ttl");
|
||||
RegisterMarker("long-ttl");
|
||||
|
||||
// Start task with short TTL (200ms)
|
||||
// Start task with short TTL. Use a TTL long enough that thread pool scheduling
|
||||
// delays on loaded CI machines don't cause the CTS to fire before the tool
|
||||
// lambda begins executing (CancelAfter starts counting at task creation, not
|
||||
// when the tool's Task.Run is scheduled).
|
||||
var shortTtlResult = await client.CallToolAsync(
|
||||
new CallToolRequestParams
|
||||
{
|
||||
Name = "trackable-tool",
|
||||
Arguments = CreateMarkerArgs("short-ttl"),
|
||||
Task = new McpTaskMetadata { TimeToLive = TimeSpan.FromMilliseconds(200) }
|
||||
Task = new McpTaskMetadata { TimeToLive = TimeSpan.FromSeconds(5) }
|
||||
},
|
||||
cancellationToken: TestContext.Current.CancellationToken);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue