File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed
Azure.Functions.PowerShellWorker.E2E/Azure.Functions.PowerShellWorker.E2E
TestFunctionApp/ExternalEventOrchestrator Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,11 @@ public async Task CurrentUtcDateTimeClientReplaysCurrentUtcDateTime()
140140 {
141141 case HttpStatusCode . Accepted :
142142 {
143+ if ( DateTime . UtcNow > startTime + orchestrationCompletionTimeout )
144+ {
145+ Assert . True ( false , $ "The orchestration has not completed after { orchestrationCompletionTimeout } ") ;
146+ }
147+
143148 await Task . Delay ( TimeSpan . FromSeconds ( 2 ) ) ;
144149 break ;
145150 }
@@ -232,6 +237,11 @@ private async Task DurableTimerClientStopsOrchestratorAndUpdatesCurrentUtcDateTi
232237 {
233238 case HttpStatusCode . Accepted :
234239 {
240+ if ( DateTime . UtcNow > startTime + orchestrationCompletionTimeout )
241+ {
242+ Assert . True ( false , $ "The orchestration has not completed after { orchestrationCompletionTimeout } ") ;
243+ }
244+
235245 await Task . Delay ( TimeSpan . FromSeconds ( 2 ) ) ;
236246 break ;
237247 }
@@ -296,6 +306,11 @@ private async Task ExternalEventClientSendsExternalEvents() {
296306 {
297307 case HttpStatusCode . Accepted :
298308 {
309+ if ( DateTime . UtcNow > startTime + orchestrationCompletionTimeout )
310+ {
311+ Assert . True ( false , $ "The orchestration has not completed after { orchestrationCompletionTimeout } ") ;
312+ }
313+
299314 await Task . Delay ( TimeSpan . FromSeconds ( 2 ) ) ;
300315 break ;
301316 }
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ $firstDuration = New-TimeSpan -Seconds $Context.Input.FirstDuration
1212$secondDuration = New-TimeSpan - Seconds $Context.Input.SecondDuration
1313
1414$firstTimeout = Start-DurableTimer - Duration $firstDuration - NoWait
15- $firstExternalEvent = Start-DurableExternalEventListener - EventName " FirstExternalEvent"
16- $firstCompleted = Wait-DurableTask - Task @ ($firstTimeout , $firstExternalEvent )
15+ $firstExternalEvent = Start-DurableExternalEventListener - EventName " FirstExternalEvent" - NoWait
16+ $firstCompleted = Wait-DurableTask - Task @ ($firstTimeout , $firstExternalEvent ) - Any
1717
1818if ($firstCompleted -eq $firstTimeout ) {
1919 $output += " FirstTimeout"
2424}
2525
2626$secondTimeout = Start-DurableTimer - Duration $secondDuration - NoWait
27- $secondExternalEvent = Start-DurableExternalEventListener - EventName " SecondExternalEvent"
28- $secondCompleted = Wait-DurableTask - Task @ ($secondTimeout , $secondExternalEvent )
27+ $secondExternalEvent = Start-DurableExternalEventListener - EventName " SecondExternalEvent" - NoWait
28+ $secondCompleted = Wait-DurableTask - Task @ ($secondTimeout , $secondExternalEvent ) - Any
2929
3030if ($secondCompleted -eq $secondTimeout ) {
3131 $output += " SecondTimeout"
You can’t perform that action at this time.
0 commit comments