Testing workflow reset

Hello,

My workflow has a few signal methods and are used before/after commands, with waits in between etc. When a workflow is reset, these signals are piled to the front. I want to unit test that after a reset, the state remains the same, the queue processes the signals the same way. However, I don’t think ResetWorkflowExecutionRequest is available in the test environment. Is there anyway to write a test for this?

Thank you!

When you reset you can specify ResetReapplyType via ResetWorkflowExecutionRequest. By default all signals after your reset point are re-applied, which i think you are also seeing.

If you don’t want to reapply signals after reset point you can set ResetReapplyType to RESET_REAPPLY_TYPE_NONE.

Will check about the testing part and get back.

1 Like