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

Azure EventHub processor tests fail

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.1.1
    • 1.10.0, 1.9.1
    • Extensions
    • None

    Description

      GetAzureEventHubTest fails with the following exception:

      -------------------------------------------------------
      T E S T S
      -------------------------------------------------------
      Running org.apache.nifi.processors.azure.eventhub.GetAzureEventHubTest
      Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.22 sec <<< FAILURE! - in org.apache.nifi.processors.azure.eventhub.GetAzureEventHubTest
      testNormalFlow(org.apache.nifi.processors.azure.eventhub.GetAzureEventHubTest) Time elapsed: 0.195 sec <<< FAILURE!
      java.lang.AssertionError: org.powermock.reflect.exceptions.FieldNotFoundException: No instance field named "isReceivedEvent" could be found in the class hierarchy of com.microsoft.azure.eventhubs.EventData.
      at org.apache.nifi.util.StandardProcessorTestRunner.run(StandardProcessorTestRunner.java:193)
      at org.apache.nifi.util.StandardProcessorTestRunner.run(StandardProcessorTestRunner.java:152)
      at org.apache.nifi.util.StandardProcessorTestRunner.run(StandardProcessorTestRunner.java:147)
      at org.apache.nifi.processors.azure.eventhub.GetAzureEventHubTest.testNormalFlow(GetAzureEventHubTest.java:108)
      Caused by: org.powermock.reflect.exceptions.FieldNotFoundException: No instance field named "isReceivedEvent" could be found in the class hierarchy of com.microsoft.azure.eventhubs.EventData.
      at org.powermock.reflect.internal.matcherstrategies.FieldNameMatcherStrategy.notFound(FieldNameMatcherStrategy.java:40)
      at org.powermock.reflect.internal.WhiteboxImpl.findSingleFieldUsingStrategy(WhiteboxImpl.java:492)
      at org.powermock.reflect.internal.WhiteboxImpl.findFieldInHierarchy(WhiteboxImpl.java:445)
      at org.powermock.reflect.internal.WhiteboxImpl.findFieldInHierarchy(WhiteboxImpl.java:433)
      at org.powermock.reflect.internal.WhiteboxImpl.setInternalState(WhiteboxImpl.java:294)
      at org.powermock.reflect.Whitebox.setInternalState(Whitebox.java:174)
      at org.apache.nifi.processors.azure.eventhub.GetAzureEventHubTest$MockGetAzureEventHub.receiveEvents(GetAzureEventHubTest.java:144)
      at org.apache.nifi.processors.azure.eventhub.GetAzureEventHub.onTrigger(GetAzureEventHub.java:316)
      at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
      at org.apache.nifi.util.StandardProcessorTestRunner$RunProcessor.call(StandardProcessorTestRunner.java:243)
      at org.apache.nifi.util.StandardProcessorTestRunner$RunProcessor.call(StandardProcessorTestRunner.java:237)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)

      Running org.apache.nifi.processors.azure.eventhub.PutAzureEventHubTest
      Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec - in org.apache.nifi.processors.azure.eventhub.PutAzureEventHubTest

      Results :

      Failed tests:
      GetAzureEventHubTest.testNormalFlow:108 org.powermock.reflect.exceptions.FieldNotFoundException: No instance field named "isReceivedEvent" could be found in the class hierarchy of com.microsoft.azure.eventhubs.EventData.

      The tests for the processors also need to be moved to src/test/java (currently in src/test) so that the tests are detected during the build.

      Attachments

        Issue Links

          Activity

            People

              fszabo Ferenc Szabo
              jtstorck Jeff Storck
              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