You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by he...@apache.org on 2026/03/28 09:10:02 UTC
(pekko) 01/01: Remove non-deterministic SnapshotSerializeSpec test case
This is an automated email from the ASF dual-hosted git repository.
hepin pushed a commit to branch port-snapshot-serialize-spec-fix
in repository https://gitbox.apache.org/repos/asf/pekko.git
commit 8c341c70ee8f4fe54f320a9eb8b9032933ba3196
Author: He-Pin <he...@gmail.com>
AuthorDate: Sat Mar 28 05:24:19 2026 +0800
Remove non-deterministic SnapshotSerializeSpec test case
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.
Co-authored-by: Copilot <22...@users.noreply.github.com>
---
.../testkit/scaladsl/CommonSnapshotTests.scala | 30 ----------------------
1 file changed, 30 deletions(-)
diff --git a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/CommonSnapshotTests.scala b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/CommonSnapshotTests.scala
index 4fc9a47d44..a3e96a69d3 100644
--- a/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/CommonSnapshotTests.scala
+++ b/persistence-testkit/src/test/scala/org/apache/pekko/persistence/testkit/scaladsl/CommonSnapshotTests.scala
@@ -537,36 +537,6 @@ trait CommonSnapshotTests extends ScalaDslUtils {
}
- "test snapshot events with RetentionCriteria after sending commands" in {
-
- lazy val tk = new SnapshotTestKit(system)
-
- val pid = randomPid()
- val act = system.spawn(
- eventSourcedBehaviorWithState(pid).withRetention(
- RetentionCriteria.snapshotEvery(numberOfEvents = 2, keepNSnapshots = 2)),
- pid)
-
- act ! Cmd("a")
- act ! Cmd("b")
- act ! Cmd("c")
- act ! Cmd("d")
- act ! Cmd("e")
- act ! Cmd("f")
- act ! Cmd("g")
- act ! Cmd("h")
- act ! Cmd("i")
- act ! Cmd("j")
- act ! Cmd("k")
-
- tk.expectNextPersisted(pid, NonEmptyState("ab"))
- tk.expectNextPersisted(pid, NonEmptyState("abcd"))
- tk.expectNextPersisted(pid, NonEmptyState("abcdef"))
- tk.expectNextPersisted(pid, NonEmptyState("abcdefgh"))
- tk.expectNextPersisted(pid, NonEmptyState("abcdefghij"))
-
- }
-
specificTests()
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org