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

TestWorkflowEnvironment doesn't invoke interceptors in the context of child workflows #1125

Closed
seiffert opened this issue Sep 8, 2021 · 0 comments

Comments

@seiffert
Copy link

seiffert commented Sep 8, 2021

Describe the bug
TestWorkflowEnvironments with custom interceptors don't seem to execute them on child workflows at the moment. I can see the ExecuteWorkflow hook of my interceptor being called for the tested main workflow, but if that workflow calls workflow.ExecuteChildWorkflow internally, the interceptor's ExecuteWorkflow hook isn't called in the context of the child workflow.

In production code, I can observe how when calling ExecuteChildWorkflow the identically-named interceptor method is called and then once the child workflow was scheduled, the interceptor's ExecuteWorkflow is called in the context of the child workflow.

To Reproduce
Is the issue reproducible? Yes

Steps to reproduce the behavior:

  • Copy cadence_test.go from this Gist to a file.
  • Run the test suite go test -v . -run=TestInterceptorTestSuite
  • Check whether the output contains the lines start Interceptor.ExecuteWorkflow "child" and end Interceptor.ExecuteWorkflow "child".

Expected behavior
Workflow Interceptors' ExecuteWorkflow method is also invoked for child-workflows.

Additional context

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

No branches or pull requests

2 participants