Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-7508

TestStandardControllerServiceInvocationHandler causes test failures in nifi-framework-core with Java 11

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Resolved
    • 1.12.0
    • 1.12.0
    • Core Framework
    • None

    Description

      NIFI-7447 added a test `TestStandardControllerServiceInvocationHandler` that resets the class loader. This causes `TemplateDeserializerTest` and `TemplateSerializerTest` in nifi-framework-core to fail with "javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath" and "java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory" with Java 11 depending on whether they run before or after `TestStandardControllerServiceInvocationHandler`.

      I've observed it on two machines, one Mac and one Linux, and across different builds and versions of OpenJDK.

      Compare:

      mvn test -ff -Dsurefire.runOrder=alphabetical -Dtest="org.apache.nifi.persistence.TemplateDeserializerTest,org.apache.nifi.controller.service.TestStandardControllerServiceInvocationHandler"

      To:

      mvn test -ff -Dsurefire.runOrder=reversealphabetical -Dtest="org.apache.nifi.persistence.TemplateDeserializerTest,org.apache.nifi.controller.service.TestStandardControllerServiceInvocationHandler"

      And:

      mvn test -ff -Dtest="!*IT,!org.apache.nifi.controller.service.TestStandardControllerServiceInvocationHandler"

      The first fails and the second two succeed.

      Attachments

        Issue Links

          Activity

            People

              jfrazee Joey Frazee
              jfrazee Joey Frazee
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h