test utility for testing PersistentActors with akka-persistence-pg plugin: Send your actors messages in a code block wrapped in a withTransactionRollback call This will make sure that all persistent messages are stored within a DB transaction that will be rolled back automatically
test utility for testing PersistentActors with akka-persistence-pg plugin: Send your actors messages in a code block wrapped in a withTransactionRollback call This will make sure that all persistent messages are stored within a DB transaction that will be rolled back automatically
Important Remarks:
make sure to configure akka-persistence to use the TestPgSyncWriteJournal class in your akka test config: pg-journal.class = "akka.persistence.pg.journal.TestPgSyncWriteJournal"
This class is not thread-safe and contains shared global state. Make sure to NOT run your tests in parallel