Closed jeremy-hanna closed 6 years ago
Thank you for filing this issue. When I pushed logic from Orchestrators to Organizers, I don't think I tested all the different components, like ContextFactory
. It works with the original Organizer methods, but might not work with the new ones.
I'll look into it or PRs to fix issues are happily accepted!
https://github.com/adomokos/light-service/pull/141 resolves this issue
Summary:
Trying to use a
ContextFactory
for testing an Organizer with awith_callback
(and possibly other methods) will lead to full execution of the Organizer to build the returned context.Failure recreation:
Technicals:
What is going on is the ContextFactory enumerates through the duplicated
organizer.actions
, however when used with awith_callback(FooAction, [ SomeStepAction ])
the callback action and subsequent steps get flattened into a lazily executed Proc here.Therefore a ContextFactoryOrganizer.organizer
.actions
will never have the action constant in the array to match on.Proposed Solution: The ContextFactoryOrganizer is going to have to get smarter and build out an Action execution path tree for these steps and wrap them in a new organizer that halts at the expected Action