Skip to content

Conversation

nytian
Copy link
Contributor

@nytian nytian commented Sep 25, 2025

This PR adds a new test framework which allow users to test their orchestration without grpc or real backend service.

Please check doc here for more details.

Key files:

  • MockDurableTaskClient.cs: A mock DurableTask client for managing orchestration instances, including starting, querying, and other operations.
  • InProcessTestOrchestrationService.cs: Acts as the backend service, dispatcher, and bridge between the client and orchestration context.
  • InProcessTaskOrchestrationContext.cs: Executes orchestration functions.
  • HelloWorldOrchestrator.cs: A sample orchestration implementation.
  • InProcessHelloWorldOrchestrationTest.cs: A sample test using this framework to test the above orchestration.

@nytian nytian changed the title Added in-process Test Framework Added In-process Test Framework Sep 25, 2025
/// <inheritdoc/>
public override Task SuspendInstanceAsync(string instanceId, string? reason = null, CancellationToken cancellation = default)
{
return this.orchestrationService.SuspendInstanceAsync(instanceId, reason, cancellation);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized that I shouldn't write suspend/resume like this as we won't be able to pause the running task. I would just throw not supported exception here for now

@nytian nytian marked this pull request as ready for review September 30, 2025 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant