coO-OO-O-co opened a new pull request, #11629:
URL: https://github.com/apache/rocketmq/pull/11629

   ### Which Issue(s) This PR Fixes
   
   Fixes #11628
   
   ### Brief Description
   
   FutureHolder manages futures used by the scheduled statistics printers but 
lacks dedicated unit tests.
   
   Add four tests covering:
   - Calling cancel(false) on all futures registered under a removed key.
   - Keeping futures under other keys unaffected and available for subsequent 
removal.
   - Handling missing keys and repeated removal without additional cancellation 
calls.
   - Registering and removing new futures under a previously removed key 
without cancelling the old futures again.
   
   The tests use Mockito mocks without threads or sleeps. No production code is 
changed.
   
   ### How Did You Test This Change?
   
   Ran locally:
   
   `mvn -B -pl common -am clean test`
   
   Results:
   - common module: 353 tests, 0 failures, 0 errors, 0 skipped.
   - FutureHolderTest: 4 tests, 0 failures, 0 errors, 0 skipped.
   - BUILD SUCCESS.


-- 
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]

  • [PR] [ISSUE #11628] Add unit te... coO-OO-O-co (via GitHub) via commits

Reply via email to