Skip to content

Commit 763944a

Browse files
committed
🚨test: Kill SnapshotSyncManager at the end of each case automatically
1 parent c17db08 commit 763944a

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/test/scala/lerna/akka/entityreplication/raft/snapshot/sync/SnapshotSyncManagerSpec.scala

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,19 @@ class SnapshotSyncManagerSpec extends TestKit(ActorSystem()) with ActorSpec with
4242
private[this] def createSnapshotSyncManager(
4343
dstSnapshotStore: ActorRef = dstRaftSnapshotStoreTestKit.snapshotStoreActorRef,
4444
): ActorRef =
45-
system.actorOf(
46-
SnapshotSyncManager.props(
47-
typeName,
48-
srcMemberIndex,
49-
dstMemberIndex,
50-
dstSnapshotStore,
51-
shardId,
52-
settings.raftSettings,
53-
),
54-
s"snapshotSyncManager:${snapshotSyncManagerUniqueId.getAndIncrement()}",
55-
)
45+
planAutoKill {
46+
system.actorOf(
47+
SnapshotSyncManager.props(
48+
typeName,
49+
srcMemberIndex,
50+
dstMemberIndex,
51+
dstSnapshotStore,
52+
shardId,
53+
settings.raftSettings,
54+
),
55+
s"snapshotSyncManager:${snapshotSyncManagerUniqueId.getAndIncrement()}",
56+
)
57+
}
5658

5759
override def beforeEach(): Unit = {
5860
super.beforeEach()

0 commit comments

Comments
 (0)