-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: fix typo #1125
feat: fix typo #1125
Conversation
feat: fix typo,adjust test code
WalkthroughThe changes primarily focus on enhancing the testing coverage and correctness in the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- jraft-core/src/test/java/com/alipay/sofa/jraft/storage/impl/BaseLogStorageTest.java (2 hunks)
- jraft-core/src/test/java/com/alipay/sofa/jraft/storage/impl/LogManagerTest.java (1 hunks)
Files skipped from review due to trivial changes (1)
- jraft-core/src/test/java/com/alipay/sofa/jraft/storage/impl/LogManagerTest.java
Additional comments not posted (2)
jraft-core/src/test/java/com/alipay/sofa/jraft/storage/impl/BaseLogStorageTest.java (2)
152-155
: LGTM! Improved variable naming and additional assertion.The variable renaming enhances readability, and the additional assertion ensures the correctness of the log entry term.
190-190
: LGTM! Method name typo correction.The typo correction in the method name improves readability and consistency.
jraft-core/src/test/java/com/alipay/sofa/jraft/storage/impl/BaseLogStorageTest.java
Show resolved
Hide resolved
chore: update getTerm calls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- jraft-core/src/test/java/com/alipay/sofa/jraft/storage/impl/BaseLogStorageTest.java (5 hunks)
- jraft-extension/bdb-log-storage-impl/src/test/java/com/alipay/sofa/jraft/storage/impl/BaseLogStorageTest.java (5 hunks)
- jraft-extension/java-log-storage-impl/src/main/java/com/alipay/sofa/jraft/storage/HybridLogStorage.java (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- jraft-core/src/test/java/com/alipay/sofa/jraft/storage/impl/BaseLogStorageTest.java
Additional comments not posted (6)
jraft-extension/java-log-storage-impl/src/main/java/com/alipay/sofa/jraft/storage/HybridLogStorage.java (1)
144-146
: Simplified term retrieval logic looks good.The refactored
getTerm
method is more straightforward and maintainable.jraft-extension/bdb-log-storage-impl/src/test/java/com/alipay/sofa/jraft/storage/impl/BaseLogStorageTest.java (5)
97-100
: Adjustment to verify term ID looks good.The added assertion ensures that the term ID is verified correctly.
108-117
: Reordered code intestAddManyEntries
looks good.The changes improve readability and ensure that assertions are correctly ordered.
160-160
: Adjustment to verify term ID looks good.The added assertion ensures that the term ID is verified correctly.
172-174
: Adjustment to verify term ID looks good.The added assertion ensures that the term ID is verified correctly.
195-195
: Fixed typo in test case name.The test case name
testAppendMantyLargeEntries
has been corrected totestAppendManyLargeEntries
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Motivation:
Modification:
Result:
Fixes #.
If there is no issue then describe the changes introduced by this PR.
Summary by CodeRabbit
Bug Fixes
testAppendMantyLargeEntries
totestAppendManyLargeEntries
to resolve typo.getTerm
method to ensure accurate term extraction fromLogEntry
objects and simplified conditional logic.Refactor
LogEntry
objects for better test coverage and clarity.