beautyarbutin opened a new pull request, #11188: URL: https://github.com/apache/rocketmq/pull/11188
### Which Issue(s) This PR Fixes - Fixes #10860 ### Brief Description The no-argument OpenMessaging `DefaultPromise.get()` returned the current result immediately, so a pending promise could return `null` instead of waiting for completion as required by the OpenMessaging API contract. This change makes `get()` delegate to the indefinite-wait path, uses a state loop to handle spurious wakeups, and restores the thread interrupt flag when an interrupted wait is cancelled. It also removes listener notification from the read path so listeners remain notified exactly once by promise completion or cancellation. Tests cover waiting for completion, failure propagation, interrupted waits, and exactly-once listener notification. ### How Did You Test This Change? Before the implementation change, the new blocking test failed because the getter thread terminated instead of entering the waiting state. ```shell mvn -pl openmessaging -am -DskipITs -Dtest=DefaultPromiseTest -Dsurefire.failIfNoSpecifiedTests=false test ``` Result: 13 tests passed, Checkstyle reported 0 violations, and SpotBugs reported no errors or warnings. -- 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]
