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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
