-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Run test servers with sudo
when running on macos-15
#19252
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
Conversation
sudo nice
when running on macos-15
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
|
||
|
||
def test(codeql, java, cwd): | ||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
if runs_on.github_actions and runs_on.posix: | |
if runs_on.github_actions and runs_on.posix and runs_on.macos_version == "15": |
Copilot uses AI. Check for mistakes.
java/ql/integration-tests/java/buildless-inherit-trust-store/test.py
Outdated
Show resolved
Hide resolved
…est.py Co-authored-by: Paolo Tranquilli <redsun82@github.com>
sudo nice
when running on macos-15
sudo
when running on macos-15
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
java/ql/integration-tests/java/buildless-snapshot-repository/test.py
Outdated
Show resolved
Hide resolved
java/ql/integration-tests/java/buildless-inherit-trust-store/test.py
Outdated
Show resolved
Hide resolved
…est.py Co-authored-by: Paolo Tranquilli <redsun82@github.com>
…est.py Co-authored-by: Paolo Tranquilli <redsun82@github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
macos-15
has issues with test maven servers, that causes timeouts. Running those servers withsudo
fixes the problem.Same fix that #19204