Repository navigation
Conversation
…and epochs Add SyncStateInfoTest: initial defaults, master info/epoch updates, caller-side and getter-side set mutation isolation, and local removal without epoch advance.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #11347 +/- ##
=============================================
- Coverage 49.73% 49.67% -0.07%
+ Complexity 14348 14328 -20
=============================================
Files 1390 1390
Lines 103246 103246
Branches 13502 13502
=============================================
- Hits 51354 51287 -67
- Misses 45696 45750 +54
- Partials 6196 6209 +13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Review by github-manager-bot
Summary
Adds SyncStateInfoTest covering the controller state-holder's defensive-copy and epoch semantics.
Findings
- [Info]
SyncStateInfoTest.java— Five tests covering initial defaults, master epoch advancement, defensive copy on input set, defensive copy on returned set, and removal from sync state. The isolation tests (mutating the set passed in / returned must not change recorded state) are particularly valuable. - [Info] Good coverage of a previously indirectly-tested component.
Suggestions
- None. Clean and thorough.
Automated review by github-manager-bot
5d7ab12 to
ff8d5d8
Compare
|
Hi @RongtongJin, sorry for the ping — this PR has been open for a while without a review yet. The change is small and focused (cover SyncStateInfo isolation and epochs), and all tests and CI pass on my side. Would you mind taking a look when you get a chance? If it looks good, merging it would be much appreciated — happy to adjust anything if needed. Thanks a lot! |
Which Issue(s) This PR Fixes
Fixes #11338
Brief Description
Adds
SyncStateInfoTest, pinning the controller state-holder's defensive-copy and epoch semantics (currently covered only indirectly through manager flows):updateMasterInfosets the master and advances the master epoch;updateSyncStateSetInfoafter the call does not change recorded state (defensive copy in);getSyncStateSet()does not change recorded state (defensive copy out);removeFromSyncStateremoves locally without advancing the sync-state epoch.Test-only change; no production code touched.
How Did You Test This Change?
mvn -pl controller -Dtest=SyncStateInfoTest -Dsurefire.failIfNoSpecifiedTests=false test(JDK 11, PR base commit):Tests run: 5, Failures: 0, Errors: 0.