Skip to content

JUnit 5 regression with native test compilation on org.junit.platform.suite.engine.ClassSelectorResolver #780

@graemerocher

Description

@graemerocher

Describe the bug

Error: Classes that should be initialized at run time got initialized during image building:
 org.junit.platform.suite.engine.ClassSelectorResolver was unintentionally initialized at build time. To see why org.junit.platform.suite.engine.ClassSelectorResolver got initialized use --trace-class-initialization=org.junit.platform.suite.engine.ClassSelectorResolver
    6,194 types,   854 fields, and 5,620 methods registered for reflection
To see how the classes got initialized, use --trace-class-initialization=org.junit.platform.suite.engine.ClassSelectorResolver

To Reproduce

Checkout https://github.com/micronaut-projects/micronaut-micrometer

And run:

./gradlew test-suite:micronaut-serialization:nativeTestCompile

System Info (please complete the following information):

  • OS: Any
  • GraalVM Version Oracle GraalVM 21.0.8+12.1
  • Java Version 21
  • Plugin version 0.11.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions