Run test servers with sudo when running on macos-15#19252
Merged
Conversation
sudo nice when running on macos-15
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR addresses test server timeouts on macos-15 by running the server process with elevated priority via “sudo nice”.
- Update the server process command to prepend “sudo nice -n 10” when a GitHub Actions environment on a posix system is detected.
- Introduce an import for the new environment helper module "runs_on" to determine the execution context.
| # This serves the "repo" directory on https://locahost:4443 | ||
| repo_server_process = subprocess.Popen(["python3", "../server.py"], cwd="repo") | ||
| command = ["python3", "../server.py"] | ||
| if runs_on.github_actions and runs_on.posix: |
There was a problem hiding this comment.
The condition does not strictly check for the 'macos-15' environment as referenced in the PR title. Consider updating the condition to explicitly target macos-15 to avoid potential unintended side-effects on other POSIX environments.
Suggested change
| if runs_on.github_actions and runs_on.posix: | |
| if runs_on.github_actions and runs_on.posix and runs_on.macos_version == "15": |
redsun82
requested changes
Apr 8, 2025
…est.py Co-authored-by: Paolo Tranquilli <redsun82@github.com>
sudo nice when running on macos-15sudo when running on macos-15
redsun82
previously approved these changes
Apr 8, 2025
Contributor
redsun82
left a comment
There was a problem hiding this comment.
minor comment related suggestions, LGTM! Thanks for taking the time to test this out!
Can you update the PR title and description to reflect the change?
…est.py Co-authored-by: Paolo Tranquilli <redsun82@github.com>
…est.py Co-authored-by: Paolo Tranquilli <redsun82@github.com>
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.
macos-15has issues with test maven servers, that causes timeouts. Running those servers withsudofixes the problem.Same fix that #19204