Skip to content

Commit b8386e0

Browse files
authored
Fix orchestration termination (#576)
1 parent 585f5a6 commit b8386e0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Durable/DurableTaskHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public void StopAndInitiateDurableTaskOrReplay(
5959
break;
6060
}
6161
}
62-
else if (scheduledHistoryEvent == null)
62+
else
6363
{
6464
InitiateAndWaitForStop(context);
6565
}

test/Unit/Durable/ActivityInvocationTaskTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ public void StopAndInitiateDurableTaskOrReplay_OutputsError_IfActivityFailed()
6464

6565
[Theory]
6666
[InlineData(false, false)]
67-
[InlineData(false, true)]
6867
[InlineData(true, false)]
6968
public void StopAndInitiateDurableTaskOrReplay_OutputsNothing_IfActivityNotCompleted(
7069
bool scheduled, bool completed)
@@ -84,14 +83,15 @@ public void StopAndInitiateDurableTaskOrReplay_OutputsNothing_IfActivityNotCompl
8483
}
8584

8685
[Theory]
87-
[InlineData(false, true)]
88-
[InlineData(true, false)]
89-
public void StopAndInitiateDurableTaskOrReplay_WaitsForStop_IfActivityNotCompleted(bool scheduledAndCompleted, bool expectedWaitForStop)
86+
[InlineData(false, false, true)]
87+
[InlineData(true, false, true)]
88+
[InlineData(true, true, false)]
89+
public void StopAndInitiateDurableTaskOrReplay_WaitsForStop_IfActivityNotCompleted(bool scheduled, bool completed, bool expectedWaitForStop)
9090
{
9191
var durableTaskHandler = new DurableTaskHandler();
9292

9393
var history = CreateHistory(
94-
scheduled: scheduledAndCompleted, completed: scheduledAndCompleted, failed: false, output: InvocationResultJson);
94+
scheduled: scheduled, completed: completed, failed: false, output: InvocationResultJson);
9595

9696
var orchestrationContext = new OrchestrationContext { History = history };
9797

0 commit comments

Comments
 (0)