test: Make the OffThread Delay test more nimble

This commit is contained in:
Jacob Alber
2026-03-31 09:59:55 -04:00
Unverified
parent 9db1bf8b61
commit 74c2ab8588
@@ -151,7 +151,10 @@ public class InProcessExecutionTests
bool messageSent = await run.TrySendMessageAsync(new TurnToken(emitEvents: true));
messageSent.Should().BeTrue("TurnToken should be accepted");
Thread.Sleep(TimeSpan.FromSeconds(2));
while (await run.GetStatusAsync() != RunStatus.Idle)
{
await Task.Delay(200);
}
// Collect events
List<WorkflowEvent> events = [];