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

   <!-- Please make sure the target branch is right. In most case, the target 
branch should be `develop`. -->
   
   ### Which Issue(s) This PR Fixes
   
   Fixes #11336
   
   ### Brief Description
   
   Adds `SemaphoreReleaseOnlyOnceTest` with direct coverage of the class's 
exactly-once release contract, which currently has no dedicated test:
   
   - 8 threads released simultaneously (CyclicBarrier) on the same holder add 
**exactly one** permit — the timeout-vs-callback race the CAS guard exists for;
   - repeated sequential releases add no further permits;
   - a null semaphore is a silent no-op (no NPE), matching how the class is 
constructed for unlimited (`null`) semaphores.
   
   Test-only change; no production code touched.
   
   ### How Did You Test This Change?
   
   `mvn -pl remoting -Dtest=SemaphoreReleaseOnlyOnceTest 
-Dsurefire.failIfNoSpecifiedTests=false test` (JDK 11, PR base commit): `Tests 
run: 3, Failures: 0, Errors: 0`.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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