mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.NET: Declarative workflows - Gracefully handle agent scenarios when no response is returned (#5376)
* Gracefully handle agent scenarios when no response is returned * Make relevant object disposable and improve exception handling.
This commit is contained in:
committed by
GitHub
Unverified
parent
d5777bc546
commit
adcd2d33f5
+23
@@ -85,6 +85,29 @@ public sealed class RequestExternalInputExecutorTest(ITestOutputHelper output) :
|
||||
expectMessagesCreated: true);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task CaptureResponseWithEmptyMessagesAsync()
|
||||
{
|
||||
await this.CaptureResponseTestAsync(
|
||||
displayName: nameof(CaptureResponseWithEmptyMessagesAsync),
|
||||
variableName: "TestVariable",
|
||||
messageCount: 0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task CaptureResponseWithEmptyMessagesAndWorkflowConversationAsync()
|
||||
{
|
||||
// Arrange
|
||||
this.State.Set(SystemScope.Names.ConversationId, FormulaValue.New("WorkflowConversationId"), VariableScopeNames.System);
|
||||
|
||||
// Act & Assert
|
||||
await this.CaptureResponseTestAsync(
|
||||
displayName: nameof(CaptureResponseWithEmptyMessagesAndWorkflowConversationAsync),
|
||||
variableName: "TestVariable",
|
||||
messageCount: 0,
|
||||
expectMessagesCreated: false);
|
||||
}
|
||||
|
||||
private async Task ExecuteTestAsync(
|
||||
string displayName,
|
||||
string variableName)
|
||||
|
||||
Reference in New Issue
Block a user