Repository navigation
Avoid fixed ports in ActorsLeakSpec - #3736
Merged
Merged
Conversation
Motivation: ActorsLeakSpec failed in PR apache#3730 CI with Address already in use because its systems bind the default port 7355 and a hardcoded restart port 7356. Modification: Allocate an available port for the first incarnation, reuse its bound address after termination, and assert that restarts retain the address with a new UID. Verify that independent systems receive different ports. Result: The leak test runs while the former fixed ports are occupied and retains its same-address quarantine and actor cleanup assertions. Tests: - Original implementation fails with BindException while port 7356 is held. - Scala 2.13.18 and 3.3.9 on JDK 17: both ActorsLeakSpec tests pass while ports 7355 and 7356 are held. - headerCreateAll, checkCodeStyle and git diff --check pass. - Scala next and validatePullRequest are delegated to GitHub CI. References: Refs apache#3730 - CI failure in ActorsLeakSpec.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
ActorsLeakSpeccan fail withjava.net.BindException: Address already in usewhen its default port 7355 or hardcoded restart port 7356 is occupied. This failed the Scala 3 validation of #3730.Modification
Result
The spec passes while both former fixed ports are occupied, preserving its actor cleanup and same-address restart coverage.
Tests
127.0.0.1:7356reproduces the CIBindException.remote / Test / testOnly org.apache.pekko.remote.classic.ActorsLeakSpecpasses both tests on JDK 17 with Scala 2.13.18 and 3.3.9 while127.0.0.1:7355and:7356are held.headerCreateAll,checkCodeStyle(including Java formatting and+headerCheckAll), native scalafmt, andgit diff --checkpass.validatePullRequestare delegated to GitHub CI.References
Refs #3730 — failed Scala 3 CI job.