You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "chennaji9 (via GitHub)" <gi...@apache.org> on 2026/10/09 14:41:40 UTC
[PR] [ISSUE #11340] test(filter): cover FilterFactory duplicate and unregister rules [rocketmq]
chennaji9 opened a new pull request, #11349:
URL: https://github.com/apache/rocketmq/pull/11349
<!-- Please make sure the target branch is right. In most case, the target branch should be `develop`. -->
### Which Issue(s) This PR Fixes
Fixes #11340
### Brief Description
Extends the existing `FilterSpiTest` with coverage of the `FilterFactory` registration rules that protect the broker's filter registry:
- registering a second SPI with an already-registered type throws `IllegalArgumentException` and the original instance survives (no silent overwrite of e.g. the built-in SQL92 filter);
- `unRegister` returns the removed filter, makes `get` return null, and the type becomes registerable again;
- registering a duplicate of the built-in `SQL92` filter is rejected and leaves the built-in filter functional.
Each test cleans the registry in `finally` so the shared factory is left as found. Test-only change; no production code touched.
### How Did You Test This Change?
`mvn -pl filter -Dtest=FilterSpiTest -Dsurefire.failIfNoSpecifiedTests=false test` (JDK 11, PR base commit): `Tests run: 5, Failures: 0, Errors: 0` (2 pre-existing + 3 new).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #11340] test(filter): cover FilterFactory duplicate and unregister rules [rocketmq]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #11349:
URL: https://github.com/apache/rocketmq/pull/11349#issuecomment-6084382479
## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/11349?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 49.66%. Comparing base ([`9ea2ccd`](https://app.codecov.io/gh/apache/rocketmq/commit/9ea2ccdc2b41445aee5e177e14e501d606f5a1ed?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`d23627a`](https://app.codecov.io/gh/apache/rocketmq/commit/d23627ace3cb7318fe4b1d12b8812a32c7fcdcdb?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## develop #11349 +/- ##
=============================================
- Coverage 49.73% 49.66% -0.08%
+ Complexity 14348 14324 -24
=============================================
Files 1390 1390
Lines 103246 103246
Branches 13502 13502
=============================================
- Hits 51354 51279 -75
- Misses 45696 45757 +61
- Partials 6196 6210 +14
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/rocketmq/pull/11349?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ISSUE #11340] test(filter): cover FilterFactory duplicate and unregister rules [rocketmq]
Posted by "chennaji9 (via GitHub)" <gi...@apache.org>.
chennaji9 commented on PR #11349:
URL: https://github.com/apache/rocketmq/pull/11349#issuecomment-6259224716
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 FilterFactory duplicate and unregister rules), 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!
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org