qianye1001 opened a new pull request, #11086:
URL: https://github.com/apache/rocketmq/pull/11086

   ### Which Issue(s) This PR Fixes
   
   Fixes #11085
   
   ### Brief Description
   
   Offset-reset tests can fail despite correct message replay: `OffsetResetIT` 
captures its baseline after resetting brokers and compares offset values 
sampled at different times. `OffsetResetForPopIT` leaves 30-second POP loops 
and directly created clients alive after its assertions, swallowing failures 
and flooding shutdown logs.
   
   Capture delivery counts before reset and calculate lag from the returned 
offset snapshot. Run the existing sequential POP/ACK/reset steps within the 
test thread, propagate operation failures, close POP clients, and restore 
modified broker settings. Message-count and ordered-message-set checks remain 
in place.
   
   The POP tests also expose a missing null guard in 
`PopConsumerService.revive()`: enabling buffering after service construction 
does not create a cache, but the statistics log dereferences it. Guard this 
access consistently with the other cache paths and add a regression test for 
the configuration change.
   
   ### How Did You Test This Change?
   
   - JDK 11: 35 tests passed (18 broker unit tests and 17 offset-reset 
integration tests); Checkstyle and SpotBugs passed. Command: `mvn -B -pl test 
-am -Dtest=OffsetResetIT,OffsetResetForPopIT,PopConsumerServiceTest 
-Dsurefire.failIfNoSpecifiedTests=false test`.
   - Controlled scheduling experiment with a temporary harness: allow all 300 
reset deliveries to complete before post-reset bookkeeping. The original test 
waits for 3,000 deliveries when only 2,700 are possible and times out; the 
patched test passes under the same schedule. The harness is not part of this 
patch.
   - The new cache-toggle regression test reproduces the null dereference 
against the original implementation.
   
   The original Bazel failure did not retain its oversized test stdout, so 
these reproduced defects are not presented as a reconstruction of its exact 
failed assertions.
   


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