kaiyaok2 opened a new issue, #8092:
URL: https://github.com/apache/rocketmq/issues/8092

   ### Before Creating the Bug Report
   
   - [X] I found a bug, not just asking a question, which should be created in 
[GitHub Discussions](https://github.com/apache/rocketmq/discussions).
   
   - [X] I have searched the [GitHub 
Issues](https://github.com/apache/rocketmq/issues) and [GitHub 
Discussions](https://github.com/apache/rocketmq/discussions)  of this 
repository and believe that this is not a duplicate.
   
   - [X] I have confirmed that this bug belongs to the current repository, not 
other repositories of RocketMQ.
   
   
   ### Runtime platform environment
   
   Ubuntu 22.04
   
   ### RocketMQ version
   
   Latest commit - af43a3e71f2bdb4765294f7d6314b1428737849d
   
   ### JDK Version
   
   JDK 17.0.10
   
   ### Describe the Bug
   
   The test ` org.apache.rocketmq.filter.FilterSpiTest#testRegister` is 
non-idempotent (passes in the first run but fails in the second run in the same 
JVM). 
   
   ### Steps to Reproduce
   
   Use the `NIOInspector` plugin that supports rerunning unit tests in the same 
JVM:
   ```
   cd filter
   mvn edu.illinois:NIODetector:rerun 
-Dtest=org.apache.rocketmq.filter.FilterSpiTest#testRegister
   ```
   It can be seen that the test passes in the first run but fails in the second 
run in the same JVM.
   
   ### What Did You Expect to See?
   
   The test shall pass in repeated execution in the same environment.
   
   ### What Did You See Instead?
   
   The following error is raised in the second execution:
   ```
   java.lang.IllegalArgumentException: Filter spi type(Nothing) already exist!
        at 
org.apache.rocketmq.filter.FilterFactory.register(FilterFactory.java:44)
        at 
org.apache.rocketmq.filter.FilterSpiTest.testRegister(FilterSpiTest.java:53)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
   ```
   
   ### Additional Context
   
   _No response_


-- 
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-unsubscr...@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to