diff --git a/dotnet/test/E2E/AskUserE2ETests.cs b/dotnet/test/E2E/AskUserE2ETests.cs index db1a4dd92b..e08ba10cb4 100644 --- a/dotnet/test/E2E/AskUserE2ETests.cs +++ b/dotnet/test/E2E/AskUserE2ETests.cs @@ -30,13 +30,11 @@ public async Task Should_Invoke_User_Input_Handler_When_Model_Uses_Ask_User_Tool } }); - await session.SendAsync(new MessageOptions + await session.SendAndWaitAsync(new MessageOptions { Prompt = "Ask me to choose between 'Option A' and 'Option B' using the ask_user tool. Wait for my response before continuing." }); - await TestHelper.GetFinalAssistantMessageAsync(session); - // Should have received at least one user input request Assert.NotEmpty(userInputRequests); @@ -62,13 +60,11 @@ public async Task Should_Receive_Choices_In_User_Input_Request() } }); - await session.SendAsync(new MessageOptions + await session.SendAndWaitAsync(new MessageOptions { Prompt = "Use the ask_user tool to ask me to pick between exactly two options: 'Red' and 'Blue'. These should be provided as choices. Wait for my answer." }); - await TestHelper.GetFinalAssistantMessageAsync(session); - // Should have received a request Assert.NotEmpty(userInputRequests);