Skip to content

Commit

Permalink
Merge pull request #690 from UltimateSoftware/bugfix/FixWorkflowTestR…
Browse files Browse the repository at this point in the history
…aceCondition

Fix race condition in MiddlewareScenario
  • Loading branch information
danielgerlag authored Nov 3, 2020
2 parents 95f99e9 + 60314a4 commit 32131e1
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ public async Task Should_run_all_workflow_and_step_middleware()
// Workflow should complete without errors
status.Should().Be(WorkflowStatus.Complete);
UnhandledStepErrors.Count.Should().Be(0);

// Wait for post middleware to complete
while (_workflowMiddleware.Any(x => !x.HasCompleted))
{
await Task.Delay(500);
}

// Each middleware should have run
_workflowMiddleware.Should()
Expand Down

0 comments on commit 32131e1

Please sign in to comment.