Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-1275

Unable to run OptaPlanner unit tests with productized version of junit (test blocker)

XMLWordPrintable

    • CR2
    • CR2
    • Workaround Exists
    • Hide

      Either exclude junit-vintage-engine from classpath or use community junit version (4.12)

      Show
      Either exclude junit-vintage-engine from classpath or use community junit version (4.12)
    • Hide

      1. download sources.zip
      2. unzip and navigate to org.optaplanner-optaplanner-7.33.0.Final-7.7.0-CR1
      3. mvn clean test (while having CR1 artifacts already present in local maven repository)

      Observed: no tests are run
      Expected: execution of all tests in the project

      Show
      1. download sources.zip 2. unzip and navigate to org.optaplanner-optaplanner-7.33.0.Final-7.7.0-CR1 3. mvn clean test (while having CR1 artifacts already present in local maven repository) Observed: no tests are run Expected: execution of all tests in the project

      Tests in optaplanner project cannot be run due to a presence of both junit-vintage-engine and a productized version of junit4 on classpath. The junit-vintage-engine fails to parse [1] product version 4.12.0.redhat-003 and, as a result, no tests are executed. The issue has been already raised with junit [2].

      As a consequence, if a customer creates a project that uses product dependencies as preferred, the project will be in the same situation due to pulling both junit-vintage-engine and product version of junit4 on its classpath.

      [1] https://github.com/junit-team/junit5/blob/master/junit-vintage-engine/src/main/java/org/junit/vintage/engine/JUnit4VersionCheck.java#L28
      [2] https://github.com/junit-team/junit5/issues/2198

      This issue prevents running tests with CR1. The described workaround changes dependencies we test with.

              ant@redhat.com Ant Stephenson
              rsynek@redhat.com Radovan Synek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: