Skip to content

Add Java CI/CD integration test for Performix.#82

Open
jaidev17 wants to merge 16 commits into
arm:mainfrom
jaidev17:feature/apx-java-hotspots-test
Open

Add Java CI/CD integration test for Performix.#82
jaidev17 wants to merge 16 commits into
arm:mainfrom
jaidev17:feature/apx-java-hotspots-test

Conversation

@jaidev17
Copy link
Copy Markdown
Contributor

@jaidev17 jaidev17 commented May 6, 2026

  • Prepare and compile CpuBurner on the runner for the APX Java hotspot test.
  • Simplify Java APX workload command in mcp-local/tests/constants.py.
  • Add success criteria: CpuBurner::workC must appear in Java hotspots.
  • Improve APX run_id parsing to handle multi-line JSON output.

jaidev17 added 14 commits April 21, 2026 16:42
…tput

The previous implementation hardcoded line index 1, which failed for the
Java workload where APX may emit the run_id JSON on a different line or
where _combine_command_output inserts [stderr] content between lines.

Now scans all JSON-looking lines (same pattern as _extract_session_id),
returning the first one that contains a valid run_id.
The cp /tmp/CpuBurnerOriginal.java approach failed because the file is
not present on the remote target at workload execution time - it was only
copied to the runner host, not the SSH target. The original base64 inline
approach is self-contained and does not depend on any pre-staged files.

Also removes the now-unnecessary workflow steps that copied the Java file
to the runner and /tmp.
Copilot AI review requested due to automatic review settings May 6, 2026 19:29
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 extends the MCP local integration test suite and CI workflow to validate APX Java “code_hotspots” support by compiling/running a Java CpuBurner workload and asserting a specific hotspot function appears in results.

Changes:

  • Add a Java CpuBurner workload (source) and compile it on the GitHub Actions runner for integration testing.
  • Add a new MCP integration test case that runs apx_recipe_run against the Java workload and checks for CpuBurner::workC in hotspots output.
  • Update APX run_id parsing logic intended to better handle varied/multi-line JSON output.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
mcp-local/utils/apx.py Updates extract_run_id parsing behavior for APX CLI output.
mcp-local/tests/test_mcp.py Adds a new Java APX hotspots integration test and success criteria.
mcp-local/tests/CpuBurnerOriginal.java Introduces a Java workload intended to produce a recognizable hotspot (workC).
mcp-local/tests/constants.py Adds a new JSON-RPC request constant for the Java APX hotspots run.
.github/workflows/integration-tests.yml Installs JDK and compiles the CpuBurner workload prior to running integration tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread mcp-local/utils/apx.py
Comment thread mcp-local/tests/test_mcp.py Outdated
Comment thread mcp-local/tests/constants.py
Comment thread mcp-local/tests/CpuBurnerOriginal.java
jaidev17 and others added 2 commits May 6, 2026 12:36
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
"params": {
"name": "apx_recipe_run",
"arguments": {
"cmd": "java -XX:+PreserveFramePointer -cp /home/apxci/cpuburner CpuBurner 30",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason this needs to run for 30 seconds? We should limit the runtime of the tests wherever possible.

Copy link
Copy Markdown
Contributor Author

@jaidev17 jaidev17 May 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the time the CpuBurner loop runs for. We can reduce it as we are not checking the raw time numbers. I did not change it as 30 secs is the time used in the Golden Testcases that the performix team provided for testing. I can reduce it down to 10 secs, if that seems feasible.

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.

3 participants