test(amber): unit tests for web state stores and websocket plumbing#5209
Merged
kunwp1 merged 1 commit intoMay 26, 2026
Merged
Conversation
Covers six pure-logic helpers under org.apache.texera.web that ship without direct coverage today: StateStore (rx observable diff + handler registry), WorkflowStateStore and ExecutionStateStore wrappers, SubscriptionManager trait, WebsocketInput type-discriminated pub/sub, and UserRoleAuthorizer. Specs exercise no-op skip on equal updates, multi-handler fan-out, Disposable removal semantics, callback exception routing, and case-sensitive enum lookup.
1 task
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5209 +/- ##
============================================
+ Coverage 48.05% 48.09% +0.03%
- Complexity 2348 2368 +20
============================================
Files 1042 1042
Lines 39973 39973
Branches 4251 4251
============================================
+ Hits 19211 19224 +13
+ Misses 19624 19609 -15
- Partials 1138 1140 +2
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
kunwp1
approved these changes
May 26, 2026
Contributor
kunwp1
left a comment
There was a problem hiding this comment.
LGTM! Since it's a test-only changes, we can safely merge this.
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.
What changes were proposed in this PR?
Add six ScalaTest specs under
amber/src/test/scala/org/apache/texera/web/covering pure-logic helpers that ship without direct unit coverage today.StateStoreSpec— observable diff filter, multi-handler fan-out, registration-order delivery, Disposable removal, double-dispose tolerance.WorkflowStateStoreSpecandExecutionStateStoreSpec— default child-store identities andgetAllStoresenumeration order.SubscriptionManagerSpec— bulk dispose semantics on the trait, including repeat-call no-op and post-clear reuse.WebsocketInputSpec— type-discriminated request routing,uidOptpass-through, callback-exception routing througherrorHandler, and subscriber isolation across throwing callbacks.UserRoleAuthorizerSpec— accept matching role, reject mismatching role, IAE on unknown / case-mismatched enum string (covers the surface that fix: enforce @RolesAllowed on microservice resources #5049 was meant to guard).Any related issues, documentation, discussions?
Closes #5208.
How was this PR tested?
Added unit tests under
amber/src/test/scala/org/apache/texera/web/.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.7