Wish for enhancement of the saga test fixture in 3.0-RC1

Hi Allard,

I would like to see some improvements in the saga test support for Axon 3.x. My saga is responsible for scheduling events based on a scheduling configuration.

Let’s say the configuration claims that every day an event should occur at 07:00, 14:00 and 19:00 o’clock. When the saga is started it looks for the next scheduling time and schedules and event. The saga is registered to this event and when the event is due, the saga handles it by scheduling the next event. This is done infinitely until the saga is ended.


Start Event±---->Saga±------>scheduled event(s)
^ +


While we are at the topic, the Saga fixture is also missing a method for checking if a scheduled event has been canelled. E.g. an “expectCancelledEvent” would be very neat.


They sound like sane requests.
Could you report them on issues.axonframework.org?

Regarding the last one, it would fit the other methods better if there was a ‘expectNoScheduledEvents(Duration/Instant)’ which check if no event is scheduled for that specific time.
Also agree on the ability to match against multiple events at the same timestamp.

To check multiple scheduled events at different timestamps, you can simply do multiple invocations. Probably the same for the vase of multiple events at the same time, as longs as the match succeeds if at least one event matches the predicate or given event.