Skip to content

Remove non-deterministic SnapshotSerializeSpec test case#2802

Open
He-Pin wants to merge 1 commit intoapache:mainfrom
He-Pin:port-snapshot-serialize-spec-fix
Open

Remove non-deterministic SnapshotSerializeSpec test case#2802
He-Pin wants to merge 1 commit intoapache:mainfrom
He-Pin:port-snapshot-serialize-spec-fix

Conversation

@He-Pin
Copy link
Copy Markdown
Member

@He-Pin He-Pin commented Mar 28, 2026

Motivation

SnapshotSerializeSpec contained a test case that was non-deterministic due to timing-dependent serialization behavior.

Modification

Removed the flaky test case that could not be made deterministic without fundamentally changing the test approach.

Note: The unrelated LogCapturing change from the upstream commit was separated out per review feedback.

Result

Reduces false CI failures from non-deterministic test behavior.

References

  • Upstream commit: akka/akka-core@50372b37c5, which is now Apache licensed.
  • Cherry-picked from akka/akka-core v2.8.0 (released March 2023, BSL -> Apache 2.0 after 3 years).

@He-Pin He-Pin marked this pull request as ready for review March 28, 2026 07:08
@He-Pin He-Pin added this to the 2.0.0-M2 milestone Mar 28, 2026
@He-Pin He-Pin requested review from Philippus and pjfanning March 28, 2026 07:52
@He-Pin
Copy link
Copy Markdown
Member Author

He-Pin commented Mar 28, 2026

Thanks for catching that, @Philippus! The LogCapturing addition to CommonUtils was part of the same upstream commit — it adds log capture support for better test diagnostics. However, it's indeed unrelated to the test removal and can be separated. I'll split it out into its own change to keep the PR focused on the non-deterministic test removal.

@He-Pin He-Pin force-pushed the port-snapshot-serialize-spec-fix branch from ac1eae6 to 8c341c7 Compare March 28, 2026 09:10
@He-Pin He-Pin requested a review from Philippus March 28, 2026 09:46
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 <223556219+Copilot@users.noreply.github.com>
@He-Pin He-Pin force-pushed the port-snapshot-serialize-spec-fix branch from 8c341c7 to 6ffb193 Compare March 28, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants