Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-69

Upgrade to JUnit 5.5.x fails

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: libraries
    • Labels:
      None

      Description

      Upgrading to JUnit Jupiter 5.5.x (and therefore using Platform 1.5.x) via:
      ```
          dependencies {
              testImplementation 'org.junit.jupiter:junit-jupiter-api:5.5.1'
              testImplementation 'org.junit.jupiter:junit-jupiter-params:5.5.1'
              testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.5.1'
          }
      ```
      yields a `java.lang.IllegalAccessError`:
      ```
      class org.junit.platform.launcher.core.LauncherFactory (in unnamed module @0x1f593d0e) cannot access class org.junit.platform.commons.util.Preconditions (in module org.junit.platform.commons) because module org.junit.platform.commons does not export org.junit.platform.commons.util to unnamed module @0x1f593d0e
      ```

      The underlying cause is twofold:
      - Gradle executes tests (partly) on the class-path
      - JUnit 5 introduced explicit module descriptors since version 5.5.0

      Guess, the parameters passed to JVM executing the test task defined/modified in {{buildSrc\module\src\main\java\org\openjdk\skara\gradle\module\ModulePlugin.java}} needs an update, too.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cstein Christian Stein
              Reporter:
              cstein Christian Stein
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: