Skip to content

Run lib.profiler unit tests in CI#9526

Open
wilx wants to merge 2 commits into
apache:masterfrom
wilx:ci-lib-profiler-tests
Open

Run lib.profiler unit tests in CI#9526
wilx wants to merge 2 commits into
apache:masterfrom
wilx:ci-lib-profiler-tests

Conversation

@wilx

@wilx wilx commented Jul 19, 2026

Copy link
Copy Markdown

This follows up on the review discussion in #9497 by adding the profiler/lib.profiler unit tests to the main CI workflow.

The new CI step runs the existing test-unit target while disabling compilation of the legacy QA-functional source set, which is not executed by that target.

The legacy CPU snapshot tests now use deterministic SampledThreadInfo fixtures for the builder logic. A focused test still exercises the public ThreadInfo[] adapter with data from ThreadMXBean, without relying on private JDK constructors, fields, or internal sun.management classes.

The heap-dump golden output is made deterministic by sorting system-property names and escaping embedded line breaks. The golden file is refreshed for that stable representation and the current JVM's floating-point string representation.

Validation:

JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 ant -f profiler/lib.profiler test-unit -Ddisable.qa-functional.tests=true

69 tests passed with no failures or errors.

Assisted-by: OpenAI GPT-5 Codex


^Add meaningful description above

Click to collapse/expand PR instructions

By opening a pull request you confirm that, unless explicitly stated otherwise, the changes -

  • are all your own work, and you have the right to contribute them.
  • are contributed solely under the terms and conditions of the Apache License 2.0 (see section 5 of the license for more information).

LLMs, Commit messages and PR description:

  • Please make sure (eg. git log) that all commits have a valid name and email address for you in the Author field.
  • LLM assisted commits should be attributed with an Assisted-by: MODEL_NAME MODEL_VERSION line appended to the commit message.
    • Please mention coding assistance in the PR description too (eg. by adding the same Assisted-by line from above)
    • Please describe the changes in your own words - we'd like to know you understand the changes being made!

If you're a first time contributor, see the Contributing guidelines for more information.

If you're a committer, please label the PR before pressing "Create pull request" so that the right test jobs can run.

PR approval and merge checklist:

  1. Was this PR correctly labeled, did the right tests run? When did they run?
  2. Is this PR squashed?
  3. Are author name / email address correct? Are co-authors correctly listed? Do the commit messages need updates?
  4. Does the PR title and description still fit after the Nth iteration? Is the description sufficient to appear in the release notes?

If this PR targets the delivery branch: don't merge. (full wiki article)

@wilx
wilx marked this pull request as ready for review July 19, 2026 21:17
wilx added 2 commits July 19, 2026 23:30
Assisted-by: OpenAI GPT-5 Codex
Assisted-by: OpenAI GPT-5 Codex
@wilx
wilx force-pushed the ci-lib-profiler-tests branch from 997f715 to d9a1a8f Compare July 19, 2026 21:31
@mbien mbien added CI continuous integration changes profiler tests labels Jul 20, 2026
@apache apache locked and limited conversation to collaborators Jul 20, 2026
@apache apache unlocked this conversation Jul 20, 2026
@mbien mbien added the Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) label Jul 20, 2026
@apache apache locked and limited conversation to collaborators Jul 20, 2026
@apache apache unlocked this conversation Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI continuous integration changes Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) profiler tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants