Add DurableStateBehaviorTestKit#3360
Merged
He-Pin merged 1 commit intoJul 18, 2026
Merged
Conversation
He-Pin
marked this pull request as draft
July 17, 2026 10:34
He-Pin
marked this pull request as ready for review
July 17, 2026 11:56
He-Pin
marked this pull request as draft
July 17, 2026 12:00
He-Pin
marked this pull request as ready for review
July 17, 2026 12:07
He-Pin
force-pushed
the
feat/3236-durable-state-behavior-testkit
branch
from
July 17, 2026 12:42
0a22aa9 to
db2a3bc
Compare
pjfanning
reviewed
Jul 18, 2026
| * The result contains the new state after the command has been processed. | ||
| * It also has support for verifying the reply to a command. | ||
| * | ||
| * Serialization of commands and state is verified automatically. |
Member
There was a problem hiding this comment.
Can you add @since 2.0.0 on new public API classes and functions?
Motivation: DurableStateBehavior lacks the high-level actor-based test API available for EventSourcedBehavior. Modification: Add matching Scala and Java DurableStateBehaviorTestKit APIs for commands, replies, state inspection, serialization checks, restart, and clear. Isolate the in-memory store between test kits, make persistence-id discovery work with catch-all signal handlers, use generated Apache headers for new files, and add documentation and directional tests. Result: Durable state behaviors can be exercised through a synchronous high-level test API with isolated state and aligned Scala and Java DSLs. Tests: - Scala 2.13 and 3.3.8 focused DurableStateBehaviorTestKit suites (17 passed on each) - sbt +mimaReportBinaryIssues - sbt docs/paradox (passed with existing duplicate-anchor warnings) - sbt checkCodeStyle - sbt headerCreateAll +headerCheckAll - JDK 17: sbt javafmtAll javafmtCheckAll - scalafmt --list --mode diff-ref=origin/main - git diff --check - Qoder stdout review: No must-fix findings References: Fixes apache#3236
He-Pin
force-pushed
the
feat/3236-durable-state-behavior-testkit
branch
from
July 18, 2026 14:02
db2a3bc to
faf7f7f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
DurableStateBehaviordoes not have the high-level actor-based test API available forEventSourcedBehavior. Issue #3236 requests matching Scala and Java APIs for commands, replies, state inspection, serialization verification, restart recovery, and clearing state.Modification
DurableStateBehaviorTestKitAPIs.clear().sbt headerCreateAllgenerated standard Apache headers for all new files.The API structure follows the existing
EventSourcedBehaviorTestKit, but the Durable State implementation is new. No external code was copied.Result
Durable state behaviors can now be tested through a high-level API in both DSLs with isolated state, restart/clear support, and serialization verification.
Tests
sbt +mimaReportBinaryIssues— passed.sbt docs/paradox— passed; only existing duplicate-anchor warnings were reported.sbt checkCodeStyle— passed.sbt headerCreateAll +headerCheckAll— passed.sbt javafmtAll javafmtCheckAll— passed.scalafmt --list --mode diff-ref=origin/main— passed with no files listed.git diff --check— passed.References
Fixes #3236