szetszwo opened a new pull request, #1583:
URL: https://github.com/apache/ratis/pull/1583

    ## What changes were proposed in this pull request?
   
     `TestTlsConfWithNetty.randomPort()` picked a random integer in `[50000, 
60000)` without checking whether the port was actually free, so any process (a 
concurrent test, a lingering CI job, or an
     ordinary listener) already bound in that range made the subsequent 
`ServerBootstrap...bind(port).syncUninterruptibly()` throw `BindException: 
Address already in use`.
   
     Route the helper through `NetUtils.getFreePort()`, which probes each 
candidate port with a `ServerSocket` before handing it out — the same helper 
`MiniRaftCluster` and other Ratis tests already use.
   
     ## Why are the changes needed?
   
     Fixes intermittent `TestTlsConfWithNetty` failures with `BindException: 
Address already in use`.
   
     ## Does this PR introduce any user-facing change?
   
     No. Test-only change.
   
     ## How was this patch tested?
   
     `mvn -pl ratis-test -Dtest=TestTlsConfWithNetty test` — all 8 tests pass.
   
     🤖 Generated with [Claude Code](https://claude.com/claude-code)
   (Spend $4.8412 including setup)


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