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

Optaweb Employee Rostering: backend module cannot execute tests

XMLWordPrintable

    • CR1
    • CR2
    • Workaround Exists
    • Hide

      Either excluding junit5 dependencies of org.springframework.boot:spring-boot-starter-test or overriding junit version to 4.12

      Show
      Either excluding junit5 dependencies of org.springframework.boot:spring-boot-starter-test or overriding junit version to 4.12
    • Hide

      1. Unzip employee rostering example from reference-implementation.zip
      2. cd optaweb-employee-rostering-backend
      3. mvn clean test (with product artifacts already present in local maven repository)

      Observation: No tests are found

      Expected: backend component tests are run

      Show
      1. Unzip employee rostering example from reference-implementation.zip 2. cd optaweb-employee-rostering-backend 3. mvn clean test (with product artifacts already present in local maven repository) Observation: No tests are found Expected: backend component tests are run

      Tests in backend module of optaweb employee rostering are not found due to productized version of junit on classpath:
      junit:junit:jar:4.12.0.redhat-003

      Surefire plugin' log puts some light on what is happening:
      -----------------------------------------------------------------------

      1. Created at 2020-02-25T08:51:03.388
        Feb 25, 2020 8:51:03 AM org.junit.platform.launcher.core.DefaultLauncher handleThrowable
      1. Created at 2020-02-25T08:51:03.388
        WARNING: TestEngine with ID 'junit-vintage' failed to discover tests
      1. Created at 2020-02-25T08:51:03.388
        org.junit.platform.commons.JUnitException: Failed to parse version of junit:junit: 4.12.0.redhat-003
        -----------------------------------------------------------------------

      There is junit5 on classpath as well, pulled by org.springframework.boot:spring-boot-starter-test. As the junit5 platform tries to bootstrap junit4 engine, it fails to parse its version.

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

                Created:
                Updated:
                Resolved: