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 }
@@ -221,6 +226,11 @@ private async Task DurableTimerClientStopsOrchestratorAndUpdatesCurrentUtcDateTi
221226 {
222227 case HttpStatusCode . Accepted :
223228 {
229+ if ( DateTime . UtcNow > startTime + orchestrationCompletionTimeout )
230+ {
231+ Assert . True ( false , $ "The orchestration has not completed after { orchestrationCompletionTimeout } ") ;
232+ }
233+
224234 await Task . Delay ( TimeSpan . FromSeconds ( 2 ) ) ;
225235 break ;
226236 }
@@ -274,6 +284,11 @@ private async Task ExternalEventClientSendsExternalEvents() {
274284 {
275285 case HttpStatusCode . Accepted :
276286 {
287+ if ( DateTime . UtcNow > startTime + orchestrationCompletionTimeout )
288+ {
289+ Assert . True ( false , $ "The orchestration has not completed after { orchestrationCompletionTimeout } ") ;
290+ }
291+
277292 await Task . Delay ( TimeSpan . FromSeconds ( 2 ) ) ;
278293 break ;
279294 }
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