Skip to content

Add functional class injection tests using startup instrumentation - #135

Merged
mcculls merged 2 commits into
mainfrom
mcculls/class-injection-ft
Oct 20, 2026
Merged

mcculls merged 2 commits into
mainfrom
mcculls/class-injection-ft

Conversation

@mcculls

@mcculls mcculls commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

What Does This Do

Adds functional class injection tests backed by instrumentation supplied by a startup test agent. Covers bootstrap injection, injection into an isolated class loader, a supplied protection domain, repeated injection, and calls between injected classes.

Motivation

Exercise class injection in real test JVMs across the supported Java versions, beyond verifying the generated glue bytecode.

Additional Notes

The new instrument-testing convention plugin supplies the test agent to every test JVM, including the additional Java version tasks.

Adds JAVA_27_HOME to Gradle's JDK environment list so Java 27 installations can be discovered.

Validation:

  • Class-inject tests passed on Java 8, 11, 17, 21, 25, 27 - and 28-ea using a temporary test task.

Contributor Checklist

Jira ticket: not provided.

@mcculls
mcculls force-pushed the mcculls/class-injection-ft branch from a274057 to 5ea45ca Compare October 17, 2026 10:49
@mcculls
mcculls marked this pull request as ready for review October 17, 2026 10:54
@mcculls
mcculls requested a review from a team as a code owner October 17, 2026 10:54
@mcculls
mcculls requested review from bric3 and dougqh and removed request for a team October 17, 2026 10:54

@dougqh dougqh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice to have functional coverage here. A few suggestions inline, all non-blocking — leaving them to your discretion.

These came from a Claude Code review that I've read through; they haven't been reproduced.

Comment thread gradle.properties
Comment thread buildSrc/src/main/kotlin/instrument-testing.gradle.kts

@dougqh dougqh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude has a few suggestions - I'll leave those to your discretion

@mcculls
mcculls merged commit e807e93 into main Oct 20, 2026
6 checks passed
@mcculls
mcculls deleted the mcculls/class-injection-ft branch October 20, 2026 20:56
@github-actions github-actions Bot added this to the 0.1.0 milestone Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants