File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -69,19 +69,21 @@ It is possible to manually clear the journal an snapshot storage, for example:
69
69
70
70
``` scala
71
71
import akka .actor .ActorSystem
72
- import akka .persistence .inmemory .extension .{ InMemoryJournalStorage , InMemorySnapshotStorage , StorageExtension }
72
+ import akka .persistence .inmemory .extension .{ InMemoryJournalStorage , InMemorySnapshotStorage , StorageExtensionProvider }
73
73
import akka .testkit .TestProbe
74
74
import org .scalatest .{ BeforeAndAfterEach , Suite }
75
75
76
76
trait InMemoryCleanup extends BeforeAndAfterEach { _ : Suite =>
77
77
78
+ def config : Config
78
79
implicit def system : ActorSystem
79
80
80
81
override protected def beforeEach (): Unit = {
81
82
val tp = TestProbe ()
82
- tp.send(StorageExtension (system).journalStorage, InMemoryJournalStorage .ClearJournal )
83
+ val extension = StorageExtensionProvider (system)
84
+ tp.send(extension.journalStorage(config), InMemoryJournalStorage .ClearJournal )
83
85
tp.expectMsg(akka.actor.Status .Success (" " ))
84
- tp.send(StorageExtension (system) .snapshotStorage, InMemorySnapshotStorage .ClearSnapshots )
86
+ tp.send(extension .snapshotStorage(config) , InMemorySnapshotStorage .ClearSnapshots )
85
87
tp.expectMsg(akka.actor.Status .Success (" " ))
86
88
super .beforeEach()
87
89
}
You can’t perform that action at this time.
0 commit comments