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

   ### Which Issue(s) This PR Fixes
   
   - Fixes #10823
   
   ### Brief Description
   
   `BrokerShutdownTest` currently starts and stops a complete broker four 
times. Each lifecycle takes roughly 15-25 seconds, so the test class exceeds 
Bazel's 60-second small-test timeout.
   
   This change keeps the default broker configuration and reduces redundant 
lifecycle setup from four instances to two:
   
   - combines graceful-shutdown and resource-cleanup assertions in one 
lifecycle;
   - retains shutdown from another thread and propagates worker failures 
through `Future#get`;
   - verifies `MessageStore` reaches `SHUTDOWN_OK` after both shutdown paths;
   - retains repeated-shutdown coverage;
   - removes the former ordering test's unused flags and unconditional 
assertion, which did not actually observe shutdown order;
   - adds teardown cleanup for assertion or timeout failure paths.
   
   Only test code is changed. There is no change to broker APIs, wire 
protocols, configuration, persisted data, or production shutdown behavior.
   
   ### How Did You Test This Change?
   
   Environment:
   
   - OpenJDK 21.0.12 (Homebrew, aarch64)
   - Apache Maven 3.9.9
   
   Command, run three times:
   
   ```shell
   mvn -q -pl broker -am -Dtest=BrokerShutdownTest \
     -DfailIfNoTests=false -DskipITs -Dspotbugs.skip=true \
     -Djacoco.skip=true test
   ```
   
   Results:
   
   - 46.375 seconds: 2 tests, 0 failures, 0 errors
   - 46.055 seconds: 2 tests, 0 failures, 0 errors
   - 39.894 seconds: 2 tests, 0 failures, 0 errors
   
   Also verified with `git diff --check`.
   


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