Distzzc opened a new pull request, #11584: URL: https://github.com/apache/rocketmq/pull/11584
### Which Issue(s) This PR Fixes Fixes #11583 ### Brief Description Add three unit tests for `ConsistentHashRouter` in the `common` module. Fixed hash positions cover an exact match, the next position, and wrap-around. The membership test checks that removing a physical node removes all three of its replicas and sends subsequent lookups to the remaining node. The third test checks the empty-ring result. ### How Did You Test This Change? ```sh mvn -B -pl common -am -Dtest=ConsistentHashRouterTest -Dsurefire.failIfNoSpecifiedTests=false clean test ``` All three tests passed on macOS ARM64 with OpenJDK 17. Checkstyle reported zero violations. The targeted JaCoCo report covered 37 of 39 lines and 19 of 22 branches in `ConsistentHashRouter`.<!-- Please make sure the target branch is right. In most case, the target branch should be `develop`. --> ### Which Issue(s) This PR Fixes <!-- Please ensure that the related issue has already been created, and [link this pull request to that issue using keywords](<https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword>) to ensure automatic closure. --> - Fixes #issue_id ### Brief Description <!-- Write a brief description for your pull request to help the maintainer understand the reasons behind your changes. --> ### How Did You Test This Change? <!-- In order to ensure the code quality of Apache RocketMQ, we expect every pull request to have undergone thorough testing. --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
