Skip to content

Commit bf93fe8

Browse files
CopilotYunchuWang
andauthored
Fix flaky integration test race condition in dedup status check (#579)
* Initial plan * Fix flaky test by waiting for orchestration to start before checking status Co-authored-by: YunchuWang <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: YunchuWang <[email protected]>
1 parent dfbbb20 commit bf93fe8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/Grpc.IntegrationTests/GrpcDurableTaskClientIntegrationTests.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,11 @@ public async Task ScheduleNewOrchestrationInstance_WithDedupeStatuses_AllowsCrea
420420
OrchestrationRuntimeStatus.Failed));
421421

422422
createdInstanceId.Should().Be(instanceId);
423+
424+
// Wait for the instance to start before checking status
425+
await server.Client.WaitForInstanceStartAsync(instanceId, default);
423426

424-
// Verify the instance was created
427+
// Verify the instance was created and is running
425428
OrchestrationMetadata? metadata = await server.Client.GetInstanceAsync(instanceId, false);
426429
metadata.Should().NotBeNull();
427430
metadata!.RuntimeStatus.Should().Be(OrchestrationRuntimeStatus.Running);

0 commit comments

Comments
 (0)