Skip to content

Tracking: existing JUnit Platform 1.x standalone projects routed to JUnit 6 until redhat.java picks up JDT fix #1873

Description

@wenytang-ms

Summary

This issue tracks the remaining end-to-end failure for existing projects that already reference junit-platform-console-standalone-1.13.x.jar.

Symptom:

  • Tests are discovered.
  • Running them uses the JDT JUnit 6 runner path, for example org.eclipse.jdt.internal.junit6.runner.JUnit6TestReference.
  • The run fails with:
java.lang.NoClassDefFoundError: org/junit/platform/engine/CancellationToken

That means a JUnit Platform 1.x standalone jar, which bundles Jupiter 5.x, is being launched through the JUnit 6 runner.

Expected behavior

Existing projects using junit-platform-console-standalone-1.13.x should continue to run as JUnit 5 projects. Users should not have to migrate existing projects to JUnit Jupiter 6 just because the VS Code Java extensions were updated.

Current status

vscode-java-test side changes are done:

Upstream JDT source fix is also merged:

That JDT fix detects junit-platform-console-standalone-* jars using the manifest Engine-Version-junit-jupiter entry, so a 1.13.x standalone jar is classified as Jupiter 5.x instead of being treated as JUnit 6.

Remaining release-chain step:

  1. JDT-LS picks up the JDT fix.
  2. redhat.java ships a build containing that JDT-LS update.
  3. Users update redhat.java and verify existing 1.13.x standalone projects run through the JUnit 5 path.

Until that build is available, users can still hit the CancellationToken failure even with the latest vscode-java-test.

Workarounds

  • If existing project dependencies must stay unchanged, stay on redhat.java 1.53 for now.
  • If changing project dependencies is acceptable, replace the old standalone jar with JUnit Jupiter 6 by running Enable Java Tests again and choosing JUnit Jupiter 6.

Closure criteria

Close this issue only after a redhat.java build containing the JDT/JDT-LS fix is available and an existing project using junit-platform-console-standalone-1.13.x is verified to run with the JUnit 5 runner.

Related

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions