Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable random port on --port 0 #666

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Enable random port on --port 0 #666

wants to merge 11 commits into from

Conversation

FabijanC
Copy link
Contributor

@FabijanC FabijanC commented Dec 20, 2024

Usage related changes

  • If user specifies --port 0, the OS finds a random port.

Development related changes

  • --port 0 is used in BackgroundDevnet as default to prevent the race condition in free port acquiring that has started to arise in Improve integration testing (file organization, time, memory) #664.
  • Use new dependency netstat2 to determine the port where BackgroundDevnet spawned.
  • Change the way spawning success is tested in BackgroundDevnet:
    • Test until one port associated with spawn subprocess PID. Then perform healthcheck (as before).
  • Remove code duplication in BackgroundDevnet::send_custom_rpc.

Checklist:

  • Checked out the contribution guidelines
  • Applied formatting - ./scripts/format.sh
  • No linter errors - ./scripts/clippy_check.sh
  • No unused dependencies - ./scripts/check_unused_deps.sh
  • No spelling errors - ./scripts/check_spelling.sh
  • Performed code self-review
  • Rebased to the latest commit of the target branch (or merged it into my branch)
    • Once you make the PR reviewable, please avoid force-pushing
  • Updated the docs if needed - ./website/README.md
  • Linked the issues resolvable by this PR - linking info
  • Updated the tests if needed; all passing - execution info

@FabijanC FabijanC marked this pull request as ready for review December 23, 2024 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant