Skip to content

junit5vintage provider resolves junit-platform-launcher to a JUnit line its vintage engine cannot wire to #6216

Description

@khatchad

Environment

  • Tycho 5.0.2, Maven 3.9.11, Java 25
  • Target platform based on the Eclipse 4.39 SimRel repository, which ships two JUnit lines side by side: jupiter 5.14.3/platform 1.14.3/vintage 5.14.3, and jupiter+platform 6.0.3 with no vintage engine at 6.x
  • An eclipse-test-plugin module whose tests are JUnit 4 (org.junit;bundle-version="4.13.2" in the test bundle), configured with <providerHint>junit5vintage</providerHint> to gain -Dtest=Class#method selection

Observed

Provider selection succeeds, but the assembled test runtime carries both JUnit lines: junit-platform-launcher resolves to 6.0.3 while junit-vintage-engine resolves to 5.14.3, which wires junit-platform-engine 1.14.3. Both version sets appear in the runtime's config.ini. Discovery then fails with:

java.util.ServiceConfigurationError: org.junit.platform.engine.TestEngine: org.junit.jupiter.engine.JupiterTestEngine not a subtype

The run aborts having executed zero tests (launcher exit code 13).

Expected

The provider constrains the platform/launcher resolution to the range its maximum available vintage engine can wire to, or fails resolution with a diagnostic naming the two lines. Assembling a runtime whose ServiceLoader spans two incompatible copies of TestEngine produces a failure that points at JUnit internals rather than at the resolution that caused it.

Other Providers Against the Same Target

  • junit5vintageinternal refuses to resolve: its supported range is [5.0.0,5.12.0), below every JUnit version the 4.39 repo ships.
  • junit6 launches a coherent 6.0.3 runtime but discovers no JUnit 4 tests, since the repo carries no 6.x vintage engine. That combination leaves no working provider for JUnit 4 test bundles against this SimRel until a 6.x vintage engine ships.

Cross-Refs

Consumer-side diagnosis matrix: ponder-lab/Hybridize-Functions-Refactoring#749 (comment)

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions