This is an automated email from the ASF dual-hosted git repository.
hepin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko.git
The following commit(s) were added to refs/heads/main by this push:
new 994c72dd63 Remove non-deterministic SnapshotSerializeSpec test case
(#2802)
994c72dd63 is described below
commit 994c72dd63fab953b2fbc4167a2aa1a7258db3f6
Author: He-Pin(kerr) <[email protected]>
AuthorDate: Tue Apr 7 03:13:51 2026 +0800
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.
---
.../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: [email protected]
For additional commands, e-mail: [email protected]