Skip to content

[Feature Request] Allow mocking child workflows like activites #524

Open
@KorDum

Description

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

In a situation where one workflow starts a child workflow, there is no way to replace the child workflow with a stub. Or I don't understand how to do it - there is no word about it in the documentation.

I found some strange behavior that led me to these thoughts.
Let's imagine that we have two workflows:

  1. Workflow A
  2. Workflow B, which is run via asyncDetached in Workflow A. Workflow B has a timer for 30 minutes

This tricky setup of two workflows allows to detect a bug (as I think). If we run an integration test on Workflow A where only the activity are replaced with stubs, then run an integration test on Workflow B, the timer waits an honest 30 minutes.

If we run only the test on Workflow B, the timer will run instantly without any waiting.

Describe the solution you'd like

It seems that if you replace Workflow B in the test for Workflow A with a stub, this strange problem goes away.

Metadata

Assignees

No one assigned

    Labels

    FeatureNew feature or requestTestsUpdate tests or testing toolsenhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions