Fix native-image build: initialize JUnit MethodSegmentResolver at runtime#1189
Fix native-image build: initialize JUnit MethodSegmentResolver at runtime#1189
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Free review on us!CodeRabbit is offering free reviews until Thu Nov 06 2025 to showcase some of the refinements we've made. Comment |
…ive-image build Co-authored-by: anidotnet <696662+anidotnet@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR configures GraalVM native image build arguments for the JUnit test engine to address runtime initialization issues. The change adds a specific build argument to defer initialization of JUnit's MethodSegmentResolver class until runtime, which is a common requirement for GraalVM native image compatibility with JUnit 5.
Key Changes
- Added GraalVM native image build configuration to defer initialization of JUnit's
MethodSegmentResolverclass to runtime
Native-image build failed because
org.junit.jupiter.engine.discovery.MethodSegmentResolverwas initialized at build time instead of runtime.Changes
--initialize-at-run-timeargument to native-maven-plugin configuration innitrite-native-tests/pom.xmlFixes job 54394718335 (ref: 71b6cf0)
Original prompt
This pull request was created as a result of the following prompt from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.