He-Pin opened a new pull request, #3015:
URL: https://github.com/apache/pekko/pull/3015

   ## Motivation
   
   `RemotingSpec` *"allow other system to connect even if it's not there at 
first"* intermittently fails at `ActorSystem` startup with **Address already in 
use** (#1679).
   
   The test allocates a port via `temporaryServerAddress()` and then binds a 
new `ActorSystem` to it; the port can be claimed by another process between 
allocation and bind.
   
   ## Modification
   
   Reuse the existing `selectionAndBind` helper — already used by the sibling 
*"be able to connect to system even if it's not there at first"* test — which 
retries on a fresh port when the bind fails with `Failed to bind`.
   
   ## Result
   
   The lazy-connect test no longer races temporary port allocation; it still 
passes locally.
   
   ```
   [info] - must allow other system to connect even if it's not there at first 
(5 seconds, 454 milliseconds)
   [info] Tests: succeeded 1, failed 0
   [info] All tests passed.
   ```
   
   ## Tests
   
   `remote/testOnly org.apache.pekko.remote.classic.RemotingSpec -- -z "allow 
other system to connect even if"` — passes. `scalafmt` run on the changed file. 
Test-only change.
   
   ## References
   
   Fixes #1679


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to