These are chat archives for RBMHTechnology/eventuate
Global-scale event sourcing and event collaboration with causal consistency
TestActorRefto get an underlying
EventsourcedActorfor synchronous unit testing?
src/test/scalafor examples). We're also planning to provide a test kit later which should make unit testing much easier.
EventLogto help us with the testing. Looking forward to the testkit :) Also, could you give clarity on why it is an error to do user stash operations in the event handler? We stash commands if our actor is inconsistent in the command handler, and unstash them if it becomes consistent after an event is applied in the event handler.
@swayam18 @mikem awesome, a mock
EventLog is an important part of future testkit, I think. Would love to see a PR :smiley:. The
EventLogSPI will further change while I'm currently working on #176 but should be rather stable then.
Your proposal of using
unstashAll() in the event handler makes absolutely sense to me. It should only be prevented to use
stash() inside the event handler, so that only commands can be stashed. I will consider that when finishing #182. Since commands are only processed by
Eventsourced* when recovery has completed,
unstashAll() will be implemented to have no effect during recovery. Does that fit your use case?