diff --git a/test/Grpc.IntegrationTests/GrpcDurableTaskClientIntegrationTests.cs b/test/Grpc.IntegrationTests/GrpcDurableTaskClientIntegrationTests.cs index 18892f1a..ae0a1516 100644 --- a/test/Grpc.IntegrationTests/GrpcDurableTaskClientIntegrationTests.cs +++ b/test/Grpc.IntegrationTests/GrpcDurableTaskClientIntegrationTests.cs @@ -420,8 +420,11 @@ public async Task ScheduleNewOrchestrationInstance_WithDedupeStatuses_AllowsCrea OrchestrationRuntimeStatus.Failed)); createdInstanceId.Should().Be(instanceId); + + // Wait for the instance to start before checking status + await server.Client.WaitForInstanceStartAsync(instanceId, default); - // Verify the instance was created + // Verify the instance was created and is running OrchestrationMetadata? metadata = await server.Client.GetInstanceAsync(instanceId, false); metadata.Should().NotBeNull(); metadata!.RuntimeStatus.Should().Be(OrchestrationRuntimeStatus.Running);