Skip to content

Commit bf3e58c

Browse files
committed
🚨test: Fix compile error in RaftMemberDataSpec
1 parent 22292a2 commit bf3e58c

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/test/scala/lerna/akka/entityreplication/raft/RaftMemberDataSpec.scala

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ final class RaftMemberDataSpec extends FlatSpec with Matchers with Inside {
289289
replicatedLog = replicatedLog,
290290
commitIndex = LogEntryIndex(3),
291291
lastApplied = LogEntryIndex(3),
292-
lastSnapshotStatus = SnapshotStatus(Term(2), LogEntryIndex(3)),
292+
lastSnapshotStatus = nonDirtySnapshotStatus(Term(2), LogEntryIndex(3)),
293293
eventSourcingIndex = Some(LogEntryIndex(3)),
294294
)
295295

@@ -359,7 +359,7 @@ final class RaftMemberDataSpec extends FlatSpec with Matchers with Inside {
359359
replicatedLog = replicatedLog,
360360
commitIndex = LogEntryIndex(3),
361361
lastApplied = LogEntryIndex(3),
362-
lastSnapshotStatus = SnapshotStatus(Term(2), LogEntryIndex(3)),
362+
lastSnapshotStatus = nonDirtySnapshotStatus(Term(2), LogEntryIndex(3)),
363363
eventSourcingIndex = Some(LogEntryIndex(2)),
364364
)
365365
inside(data.compactReplicatedLog(preserveLogSize = 2).replicatedLog) {
@@ -400,7 +400,7 @@ final class RaftMemberDataSpec extends FlatSpec with Matchers with Inside {
400400
replicatedLog = replicatedLog,
401401
commitIndex = LogEntryIndex(3),
402402
lastApplied = LogEntryIndex(3),
403-
lastSnapshotStatus = SnapshotStatus(Term(2), LogEntryIndex(3)),
403+
lastSnapshotStatus = nonDirtySnapshotStatus(Term(2), LogEntryIndex(3)),
404404
eventSourcingIndex = None,
405405
)
406406
inside(data.compactReplicatedLog(preserveLogSize = 2).replicatedLog) {
@@ -571,4 +571,12 @@ final class RaftMemberDataSpec extends FlatSpec with Matchers with Inside {
571571
actual.event should be(expected.event)
572572
}
573573

574+
private def nonDirtySnapshotStatus(snapshotLastTerm: Term, snapshotLastLogIndex: LogEntryIndex): SnapshotStatus = {
575+
SnapshotStatus(
576+
snapshotLastTerm = snapshotLastTerm,
577+
snapshotLastLogIndex = snapshotLastLogIndex,
578+
targetSnapshotLastTerm = snapshotLastTerm,
579+
targetSnapshotLastLogIndex = snapshotLastLogIndex,
580+
)
581+
}
574582
}

0 commit comments

Comments
 (0)