Skip to content

6.0.1 breaks GraalVM native image testing with GraalVM plugin 0.11.2 #5134

Description

@michael-simons

The upgrade from JUnit 6.0.0 to 6.0.1 breaks our native image test setup

https://github.com/neo4j/neo4j-jdbc/actions/runs/19024418716/job/54326185115?pr=1163#step:6:505

https://github.com/neo4j/neo4j-jdbc/blob/1a70651efac291119b24a4c18d61c61060c86cd4/neo4j-jdbc-it/neo4j-jdbc-it-cp/pom.xml#L127-L152

Reproducible with this branch https://github.com/neo4j/neo4j-jdbc/tree/dependabot/maven/org.junit-junit-bom-6.0.1:

./mvnw -Dnative -pl neo4j-jdbc-it/neo4j-jdbc-it-cp -am clean verify

Results in:

Error: Classes that should be initialized at run time got initialized during image building:
 org.junit.jupiter.engine.discovery.MethodSegmentResolver was unintentionally initialized at build time. To see why org.junit.jupiter.engine.discovery.MethodSegmentResolver got initialized use --trace-class-initialization=org.junit.jupiter.engine.discovery.MethodSegmentResolver
To see how the classes got initialized, use --trace-class-initialization=org.junit.jupiter.engine.discovery.MethodSegmentResolver

Tested with

GraalVM 21 and JUnit 6.0.1 and GraalVM Maven plugin 0.11.2

Doesn't seem to happen on GraalVM 24 and 25.

As I do wanted to upgrade the pipelines to 25 anyway, it won't be a biggy for us, but it might be for others.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions