File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
src/test/scala/lerna/akka/entityreplication/raft Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -33,10 +33,11 @@ class RaftActorSnapshotSynchronizationSpec
3333 override def beforeEach (): Unit = {
3434 super .beforeEach()
3535 // clear storage
36+ val probe = TestProbe ()
3637 val storage = StorageExtension (system)
37- storage.journalStorage ! InMemoryJournalStorage .ClearJournal
38- storage.snapshotStorage ! InMemorySnapshotStorage .ClearSnapshots
39- receiveWhile(messages = 2 ) {
38+ probe.send( storage.journalStorage, InMemoryJournalStorage .ClearJournal )
39+ probe.send( storage.snapshotStorage, InMemorySnapshotStorage .ClearSnapshots )
40+ probe. receiveWhile(messages = 2 ) {
4041 case _ : Status .Success => Done
4142 } should have length 2
4243 // reset SnapshotStore
Original file line number Diff line number Diff line change @@ -59,12 +59,13 @@ class SnapshotSyncManagerSpec extends TestKit(ActorSystem()) with ActorSpec with
5959 override def beforeEach (): Unit = {
6060 super .beforeEach()
6161 // clear storage
62+ val probe = TestProbe ()
6263 val storage = StorageExtension (system)
63- storage.journalStorage ! InMemoryJournalStorage .ClearJournal
64- storage.snapshotStorage ! InMemorySnapshotStorage .ClearSnapshots
65- receiveWhile(messages = 2 ) {
64+ probe.send( storage.journalStorage, InMemoryJournalStorage .ClearJournal )
65+ probe.send( storage.snapshotStorage, InMemorySnapshotStorage .ClearSnapshots )
66+ probe. receiveWhile(messages = 2 ) {
6667 case _ : Status .Success => Done
67- }
68+ } should have length 2
6869 // reset TestKits
6970 srcRaftSnapshotStoreTestKit.reset()
7071 dstRaftSnapshotStoreTestKit.reset()
You can’t perform that action at this time.
0 commit comments