I am working on a project based on Akka Persistent FSM. In particular:
I want to know how best to structure test cases for independence? Since state changes are saved (this is not very well explained in the documentation, but can be seen here ), it can be difficult so that my regular actors always start in a clean state. Do I need to embed reset manually in my FSM protocol? If so, this does not seem ideal, as this is a new behavior that requires testing on its own.
What is the best way to manage the journal itself when testing? Is there an easy way to configure the use of another log for testing without making this choice explicitly in the actorβs design itself? The Plugin TCK section of the docs mentions deleting the entire log file manually. This seems reasonable for testing the plugins themselves, but seems like an unnecessary low-level solution for application code. Perhaps I need to explicitly call asyncDeleteMessagesTo in a test failure? It still seems pretty low, but maybe it's just an infrastructure that is not yet built into the library.
source
share