Including a ctx.skip_remaining! in a reduce_until step causes an infinite loop of execution.
Recreation
class OrchestratorTestSkipState
extend LightService::Orchestrator
def self.run_inside_skip
with(:number => 1).reduce([
reduce_until(->(ctx) { ctx[:number] == 3 }, [
TestDoubles::SkipAllAction,
TestDoubles::AddOneAction ])
])
end
end
it 'skips all the rest of the actions' do
result = OrchestratorTestSkipState.run_inside_skip
expect(result).to be_success
expect(result[:number]).to eq(1)
end
Summary
Including a
ctx.skip_remaining!
in areduce_until
step causes an infinite loop of execution.Recreation