Add standalone activity start delay support#691
Open
eamsden wants to merge 2 commits into
Open
Conversation
maciejdudko
requested changes
May 14, 2026
Contributor
maciejdudko
left a comment
There was a problem hiding this comment.
Looks good, just needs a small change in test setup.
| [Fact] | ||
| public async Task StartActivityAsync_StartDelay_WaitsProperly() | ||
| { | ||
| await using var env = await Temporalio.Testing.WorkflowEnvironment.StartLocalAsync(new() |
Contributor
There was a problem hiding this comment.
Instead of this, use the default test env and set the CLI version and dynamic config globally:
Expose StartDelay on StartActivityOptions, validate that it is non-negative, and pass it through to StartActivityExecutionRequest. Add integration coverage for delayed standalone activity dispatch and document the new option.
Move the delayed standalone activity server version and dynamic config into the shared local test environment, then use the default client and worker helper in the start-delay test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expose StartDelay on StartActivityOptions, validate that it is non-negative, and pass it through to StartActivityExecutionRequest.
Add integration coverage for delayed standalone activity dispatch and document the new option.
What was changed
Added
StartActivityOptions.StartDelayfor standalone activities.The client now validates that
StartDelayis non-negative and maps it toStartActivityExecutionRequest.StartDelaywhen starting a standalone activity. The README standalone activity section now mentions the new option.Added tests covering client-side rejection of negative start delays and an integration test that verifies a delayed standalone activity starts after the configured delay.
Why?
Standalone activities support delayed first dispatch at the service API level, but the .NET client was not exposing or wiring that field. This gives users a typed way to delay the first activity task without affecting retries.
Checklist
Closes N/A
How was this tested:
dotnet format --verify-no-changesdotnet build -p:RestoreLockedMode=truedotnet test tests/Temporalio.Tests/Temporalio.Tests.csproj --no-restore --filter FullyQualifiedName~Temporalio.Tests.Client.TemporalClientActivityTests.StartActivityAsync_NegativeStartDelay_Throwsdotnet test tests/Temporalio.Tests/Temporalio.Tests.csproj --no-restore --filter FullyQualifiedName~Temporalio.Tests.Client.TemporalClientActivityTests.StartActivityAsync_StartDelay_WaitsProperlyREADME updated for standalone activity
StartDelay. No docs.temporal.io update included.