Skip to content

Commit be8bfa1

Browse files
CopilotYunchuWang
andcommitted
Fix compilation error: revert to CancellationToken.None
TaskOrchestrationContext doesn't have a CancellationToken property. Reverted to using CancellationToken.None which was the original implementation. Co-authored-by: YunchuWang <[email protected]>
1 parent 70cd4fa commit be8bfa1

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

test/Grpc.IntegrationTests/GrpcDurableTaskClientIntegrationTests.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -638,13 +638,9 @@ static async Task<string> LongRunningOrchestration(TaskOrchestrationContext cont
638638
context.SetCustomStatus("waiting");
639639
// Wait for external event or a timer (30 seconds) to allow suspend/resume operations
640640
Task<string> eventTask = context.WaitForExternalEvent<string>("event");
641-
Task timerTask = context.CreateTimer(TimeSpan.FromSeconds(30), context.CancellationToken);
642-
Task completedTask = await Task.WhenAny(eventTask, timerTask);
643-
644-
if (completedTask == timerTask)
645-
{
646-
throw new TimeoutException("Timed out waiting for external event 'event'.");
647-
}
641+
Task timerTask = context.CreateTimer(TimeSpan.FromSeconds(30), CancellationToken.None);
642+
await Task.WhenAny(eventTask, timerTask);
643+
648644
if (shouldThrow)
649645
{
650646
throw new InvalidOperationException("Orchestration failed");

0 commit comments

Comments
 (0)