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

Add ParentClosePolicy to unit test #471

Merged
merged 1 commit into from
Jun 18, 2021

Conversation

yiminc
Copy link
Member

@yiminc yiminc commented Jun 18, 2021

What was changed

Add ParentClosePolicy to unit test

Why?

Properly support ParentClosePolicy in unit test.

Checklist

  1. Closes Test to support ParentClosePolicy #470

  2. How was this tested:
    New unit tests

  3. Any docs updates needed?

No.

@yiminc yiminc force-pushed the test_parent_policy branch from f1addaa to d3818de Compare June 18, 2021 03:15
if handle.env.parentEnv != nil &&
env.workflowInfo.WorkflowExecution.ID == handle.env.parentEnv.workflowInfo.WorkflowExecution.ID {
// current env is parent workflow of handle's workflow
if handle.params.ParentClosePolicy == enumspb.PARENT_CLOSE_POLICY_REQUEST_CANCEL {
Copy link
Member

@mfateev mfateev Jun 18, 2021

Choose a reason for hiding this comment

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

What about TERMINATE? I know it doesn't make sense for the root parent workflow, but what about the child of the child of the root?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. We need to handle that as well. Will do in a follow up PR.

@yiminc yiminc merged commit a20fa2d into temporalio:master Jun 18, 2021
@yiminc yiminc mentioned this pull request Jun 18, 2021
yiminc added a commit that referenced this pull request Jun 21, 2021
Unit test to properly handle parent close policy of terminate. This is a follow up of #471
@yiminc yiminc deleted the test_parent_policy branch September 19, 2021 18:16
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.

Test to support ParentClosePolicy
3 participants