add hook before each persistence TCK test case

This commit is contained in:
Roland Kuhn 2016-02-06 16:26:44 +01:00
parent 6f06e60480
commit edc92eb53e

View file

@ -46,9 +46,17 @@ abstract class JournalSpec(config: Config) extends PluginSpec(config) with MayVe
super.beforeEach()
senderProbe = TestProbe()
receiverProbe = TestProbe()
preparePersistenceId(pid)
writeMessages(1, 5, pid, senderProbe.ref, writerUuid)
}
/**
* Overridable hook that is called before populating the journal for the next
* test case. `pid` is the `persistenceId` that will be used in the test.
* This method may be needed to clean pre-existing events from the log.
*/
def preparePersistenceId(pid: String): Unit = ()
/**
* Implementation may override and return false if it does not
* support atomic writes of several events, as emitted by `persistAll`.