Skip to content

Commit 32131e1

Browse files
authored
Merge pull request #690 from UltimateSoftware/bugfix/FixWorkflowTestRaceCondition
Fix race condition in MiddlewareScenario
2 parents 95f99e9 + 60314a4 commit 32131e1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/WorkflowCore.IntegrationTests/Scenarios/MiddlewareScenario.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ public async Task Should_run_all_workflow_and_step_middleware()
136136
// Workflow should complete without errors
137137
status.Should().Be(WorkflowStatus.Complete);
138138
UnhandledStepErrors.Count.Should().Be(0);
139+
140+
// Wait for post middleware to complete
141+
while (_workflowMiddleware.Any(x => !x.HasCompleted))
142+
{
143+
await Task.Delay(500);
144+
}
139145

140146
// Each middleware should have run
141147
_workflowMiddleware.Should()

0 commit comments

Comments
 (0)