Skip to content

Add unit tests for ActorObjectSerializer#1790

Open
manduinca wants to merge 1 commit into
dapr:masterfrom
manduinca:unit-tests-actor-object-serializer
Open

Add unit tests for ActorObjectSerializer#1790
manduinca wants to merge 1 commit into
dapr:masterfrom
manduinca:unit-tests-actor-object-serializer

Conversation

@manduinca

Copy link
Copy Markdown

Description

Adds a dedicated unit test class for ActorObjectSerializer in sdk-actors. This serializer had no test of its own, and the timer deserialization path (ActorTimerParams) had no coverage at all.

The 10 new tests cover: null handling in serialize/deserialize, timer serialization including the data field (base64), timer round trips with and without data, timer JSON with missing optional attributes, ActorRuntimeConfig serialization with all attributes and per-type entitiesConfig, and default pass-through for custom types.

ActorRuntimeTest and ActorProxyImplTest already grew a lot since the issue was filed, so this PR is scoped to the remaining gap.

Verified locally with ./mvnw -pl sdk-actors -am install -DskipITs=true: 159 tests in the module, 0 failures. Checkstyle clean.

Issue reference

Part of #369

Checklist

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation (test-only change)

Covers the previously untested paths of ActorObjectSerializer:
actor timer deserialization (including the data attribute and
missing optional attributes), null handling in serialize and
deserialize, actor runtime config serialization with all
attributes and per-type configs, and the default serialization
pass-through for custom types.

Part of dapr#369

Signed-off-by: Jean Pierre Mandujano G. <jeanpierre.mandujano@gmail.com>
@manduinca
manduinca requested review from a team as code owners July 19, 2026 08:08
@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.99%. Comparing base (c60f0df) to head (f7c2afa).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1790      +/-   ##
============================================
+ Coverage     76.89%   76.99%   +0.09%     
- Complexity     2300     2306       +6     
============================================
  Files           244      244              
  Lines          7145     7145              
  Branches        748      748              
============================================
+ Hits           5494     5501       +7     
+ Misses         1285     1284       -1     
+ Partials        366      360       -6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant