Hallo,
i try to test the ordering of event and i need a possibility to change a creation event time of given events by testFixture.
How can i do this?
thx.
Hallo,
i try to test the ordering of event and i need a possibility to change a creation event time of given events by testFixture.
How can i do this?
thx.
i have already tryed.
`
final Instant minus = Instant.now().minus(1, ChronoUnit.DAYS);
testFixture.given(someInitializationEvent, someUpdateEvent).andGivenCurrentTime(minus)
.when(reduceCommand)
.expectEvents(new ReduceApprovedEvent(anyString, order.getQuantity()));
`
but i if get an event, the timestamp on event sourcing handler method is not changed.
`
@EventSourcingHandler
protected void on(AvailableQuantityUpdatedEvent event, @Timestamp Instant timeStamp) {
this.quantity = event.getQuantity();
this.lastUpdateFromPartner = Date.from(timeStamp);
}
`
what do i’m wrong.
Hi,
there are two things:
Number 2 is fixed in Axon 4.0.1, which will be available very soon. Issue number 1 is something you’ll be able to fix hen 4.0.1 is out.
Cheers,
Allard