Skip to content

Run lib.profiler unit tests in CI#9526

Merged
matthiasblaesing merged 1 commit into
apache:masterfrom
wilx:ci-lib-profiler-tests
Jul 23, 2026
Merged

Run lib.profiler unit tests in CI#9526
matthiasblaesing merged 1 commit into
apache:masterfrom
wilx:ci-lib-profiler-tests

Conversation

@wilx

@wilx wilx commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

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

@wilx
wilx marked this pull request as ready for review July 19, 2026 21:17
@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
@matthiasblaesing

Copy link
Copy Markdown
Contributor

Thanks for taking care. Would you please squash the commits?

As @mbien followed the same instinct as I did (profiler label should cause profiler tests to run) I would suggest, that you also change the label filter to profiler (see Label list):

if: ${{ contains(github.event.pull_request.labels.*.name, 'Java') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}

That way the label profiler will run the profiler tests.

@wilx

wilx commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for taking care. Would you please squash the commits?

As @mbien followed the same instinct as I did (profiler label should cause profiler tests to run) I would suggest, that you also change the label filter to profiler (see Label list):

if: ${{ contains(github.event.pull_request.labels.*.name, 'Java') || contains(github.event.pull_request.labels.*.name, 'ci:all-tests') || github.event_name != 'pull_request' }}

That way the label profiler will run the profiler tests.

Should I keep the 'Java' part as well in there?

Add condition to run `profiler-test` with `profiler` label.

Stabilize lib.profiler heap dump output

Assisted-by: OpenAI GPT-5 Codex
@wilx
wilx force-pushed the ci-lib-profiler-tests branch from d9a1a8f to b9ad583 Compare July 22, 2026 17:26
@mbien mbien added this to the NB32 milestone Jul 22, 2026
@matthiasblaesing
matthiasblaesing merged commit 4981b98 into apache:master Jul 23, 2026
39 checks passed
@matthiasblaesing

Copy link
Copy Markdown
Contributor

@wilx thanks for taking care!

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.

3 participants