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

   ### Which Issue(s) This PR Fixes
   
   - Fixes #10562
   
   ### Brief Description
   
   `PopConsumerServiceTest#transferToFsStoreTest` takes ~60 seconds to run 
because `consumerService.start()` launches two background threads (revive + 
cache cleanup) that are completely unnecessary for the test.
   
   The revive thread repeatedly hits NPE (unmocked `EscapeBridge`) and sleeps 
500ms per cycle. During shutdown, `ServiceThread.waitForRunning()` overwrites 
`this.thread` with the calling thread, causing `wakeup()` to unpark the wrong 
thread and delaying exit.
   
   **Fix**: Replace `consumerService.start()/shutdown()` with 
`consumerService.getPopConsumerStore().start()/shutdown()`, which only 
initializes the RocksDB store without starting background threads. This matches 
the pattern used by other tests in the same file (`reviveRetryTest`, 
`reviveBackoffRetryTest`).
   
   **Result**: Test time **~60s → ~1.3s**, same assertions, same pass/fail 
behavior.
   
   ### How Did You Test This Change?
   
   Ran `PopConsumerServiceTest#transferToFsStoreTest` locally:
   - Test passes with identical assertions
   - `transferToFsStore` completes in ~26ms (3 records)
   - RocksDB resources properly cleaned up via 
`getPopConsumerStore().shutdown()`


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