uber-go / cadence-client

Framework for authoring workflows and activities running on top of the Cadence orchestration engine.

Home Page:https://cadenceworkflow.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unit Testing a child workflow issue

btree1970 opened this issue · comments

commented

Is your feature request related to a problem? Please describe.

Unit testing a child workflow that depends on a context passed from the parent is impossible to test at this point. For example lets say we want to get the parentExecution detail. We do the following:
parentExecution := workflow.GetInfo(ctx).ParentWorkflowExecution

Since we are running this child workflow from a new test workflow execution it will return nil. This results in having a nil reference in our code.

Proposed Solution
Having an option to set what the ParentWorkflowExecution will be when setting up a New workflow environment would be great.