Skip to content

Commit 994c72d

Browse files
authored
Remove non-deterministic SnapshotSerializeSpec test case (#2802)
Remove the 'test snapshot events with RetentionCriteria after sending commands' test that was never deterministic — it sent all commands at once and expected snapshots in a specific order, but internal async processing made the interleaving non-deterministic. Also add LogCapturing to CommonUtils trait for better test diagnostics. Upstream: akka/akka-core@50372b37c5 Cherry-picked from akka/akka-core v2.8.0, which is now Apache licensed.
1 parent abdc2d2 commit 994c72d

1 file changed

Lines changed: 0 additions & 30 deletions

File tree

persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/CommonSnapshotTests.scala

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -537,36 +537,6 @@ trait CommonSnapshotTests extends ScalaDslUtils {
537537

538538
}
539539

540-
"test snapshot events with RetentionCriteria after sending commands" in {
541-
542-
lazy val tk = new SnapshotTestKit(system)
543-
544-
val pid = randomPid()
545-
val act = system.spawn(
546-
eventSourcedBehaviorWithState(pid).withRetention(
547-
RetentionCriteria.snapshotEvery(numberOfEvents = 2, keepNSnapshots = 2)),
548-
pid)
549-
550-
act ! Cmd("a")
551-
act ! Cmd("b")
552-
act ! Cmd("c")
553-
act ! Cmd("d")
554-
act ! Cmd("e")
555-
act ! Cmd("f")
556-
act ! Cmd("g")
557-
act ! Cmd("h")
558-
act ! Cmd("i")
559-
act ! Cmd("j")
560-
act ! Cmd("k")
561-
562-
tk.expectNextPersisted(pid, NonEmptyState("ab"))
563-
tk.expectNextPersisted(pid, NonEmptyState("abcd"))
564-
tk.expectNextPersisted(pid, NonEmptyState("abcdef"))
565-
tk.expectNextPersisted(pid, NonEmptyState("abcdefgh"))
566-
tk.expectNextPersisted(pid, NonEmptyState("abcdefghij"))
567-
568-
}
569-
570540
specificTests()
571541
}
572542

0 commit comments

Comments
 (0)