Skip to content

Commit b5e1b25

Browse files
committed
use sudo nice for running maven test server
1 parent a7943d8 commit b5e1b25

File tree

1 file changed

+6
-1
lines changed
  • java/ql/integration-tests/java/buildless-inherit-trust-store

1 file changed

+6
-1
lines changed

java/ql/integration-tests/java/buildless-inherit-trust-store/test.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import subprocess
22
import os
3+
import runs_on
34

45

56
def test(codeql, java, cwd):
67
# This serves the "repo" directory on https://locahost:4443
7-
repo_server_process = subprocess.Popen(["python3", "../server.py"], cwd="repo")
8+
command = ["python3", "../server.py"]
9+
if runs_on.github_actions and runs_on.posix:
10+
# On GitHub Actions, we try to run the server with higher priority
11+
command = ["sudo", "nice", "-n", "10"] + command
12+
repo_server_process = subprocess.Popen(command, cwd="repo")
813
certspath = cwd / "jdk8_shipped_cacerts_plus_cert_pem"
914
# If we override MAVEN_OPTS, we'll break cross-test maven isolation, so we need to append to it instead
1015
maven_opts = os.environ["MAVEN_OPTS"] + f" -Djavax.net.ssl.trustStore={certspath}"

0 commit comments

Comments
 (0)