Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to cancel workflows by ID when testing #1392

Merged
merged 2 commits into from
Feb 21, 2024

Conversation

recht
Copy link
Contributor

@recht recht commented Feb 21, 2024

What was changed

Added a function in TestWorkflowEnvironment to allow canceling arbitrary workflows, in line with SignalWorkflowByID and QueryWorkflowByID

Why?

This makes it possible to cancel child executions and test the behavior of doing so.

@recht recht requested a review from a team as a code owner February 21, 2024 10:00
@CLAassistant
Copy link

CLAassistant commented Feb 21, 2024

CLA assistant check
All committers have signed the CLA.

@Quinn-With-Two-Ns
Copy link
Contributor

Thanks for the contribution, can you please add some unit tests to verify this change? I would like to see a test like this

func (s *WorkflowTestSuiteUnitTest) Test_WorkflowCancellation() {
for the new API and a test that cancels a child workflow using the new API.

@Quinn-With-Two-Ns Quinn-With-Two-Ns merged commit 6d4ec2d into temporalio:master Feb 21, 2024
12 checks passed
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.

3 participants