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

   ### Before Creating the Enhancement Request
   
   - [x] I have confirmed that this should be classified as an enhancement 
rather than a bug/feature.
   
   
   ### Summary
   
   Add focused unit tests for RoundQueue in the common module, covering 
duplicate detection and FIFO eviction at capacity boundaries.
   
   ### Motivation
   
   RoundQueue maintains a bounded collection of distinct values, but currently 
has no direct unit tests.
   
   Tests would help detect regressions such as accepting equal values more than 
once, evicting the wrong element when full, or changing the eviction order 
after a duplicate insertion.
   
   ### Describe the Solution You'd Like
   
   Add deterministic tests for the following cases:
   
   - Equal values represented by different object instances are treated as 
duplicates.
   - A queue with capacity one rejects duplicates and evicts the previous value 
when a new value arrives.
   - A full queue evicts the oldest value while retaining the other values.
   - Rejected duplicate insertions do not refresh insertion order.
   
   The tests exercise the public put method without accessing internal fields 
or requiring external services.
   
   ### Describe Alternatives You've Considered
   
   These behaviors could be exercised indirectly through callers. Direct unit 
tests make the capacity and ordering boundaries easier to verify.
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to