mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
feat: Solidify Concurrency Model for Inproc Workflows (#925)
* Disallow execution of multiple workflows at once * Define notion of executor Reset() to allow reuse of workflows with shared executor instances * Switch to delivering all messages to a single executor sequentially, with executors running in parallel
This commit is contained in:
@@ -103,6 +103,9 @@ public class InProcessStateTests
|
||||
Run run = await InProcessExecution.RunAsync<TurnToken>(workflow, new());
|
||||
|
||||
run.Status.Should().Be(RunStatus.Idle);
|
||||
|
||||
writer.Completed.Should().BeTrue();
|
||||
validator.Completed.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -129,8 +132,11 @@ public class InProcessStateTests
|
||||
|
||||
Checkpointed<Run> checkpointed = await InProcessExecution.RunAsync<TurnToken>(workflow, new(), CheckpointManager.Default);
|
||||
|
||||
checkpointed.Checkpoints.Should().HaveCount(6);
|
||||
checkpointed.Checkpoints.Should().HaveCount(5);
|
||||
checkpointed.Run.Status.Should().Be(RunStatus.Idle);
|
||||
|
||||
writer.Completed.Should().BeTrue();
|
||||
validator.Completed.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user