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

TestProcessorLifecycle and TestStandardProcessScheduler classes causes brittle builds and appears to be an integration test

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.0.0
    • None
    • None

    Description

      The tests in TestProcessorLifecycle appear to be attempting to replicate various threading scenarios. Such tests are notoriously difficult to get right and indeed the build is brittle as a result. These tests are likely valuable and should be improved but they also should be considered integration tests it appears.

      Tests run: 16, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 42.708 sec <<< FAILURE! - in org.apache.nifi.controller.scheduling.TestProcessorLifecycle
      validateSuccessfullAndOrderlyShutdown(org.apache.nifi.controller.scheduling.TestProcessorLifecycle) Time elapsed: 6.313 sec <<< FAILURE!
      java.lang.AssertionError: expected:<3> but was:<2>
      at org.junit.Assert.fail(Assert.java:88)
      at org.junit.Assert.failNotEquals(Assert.java:834)
      at org.junit.Assert.assertEquals(Assert.java:645)
      at org.junit.Assert.assertEquals(Assert.java:631)
      at org.apache.nifi.controller.scheduling.TestProcessorLifecycle.validateSuccessfullAndOrderlyShutdown(TestProcessorLifecycle.java:224)

      This test also causes build problems and seems to be of a similar style
      Tests run: 9, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 21.447 sec <<< FAILURE! - in org.apache.nifi.controller.scheduling.TestStandardProcessScheduler
      validateEnabledDisableMultiThread(org.apache.nifi.controller.scheduling.TestStandardProcessScheduler) Time elapsed: 5.667 sec <<< FAILURE!
      java.lang.AssertionError: null
      at org.junit.Assert.fail(Assert.java:86)
      at org.junit.Assert.assertTrue(Assert.java:41)
      at org.junit.Assert.assertTrue(Assert.java:52)
      at org.apache.nifi.controller.scheduling.TestStandardProcessScheduler.validateEnabledDisableMultiThread(TestStandardProcessScheduler.java:373)

      Brittle tests like this risk the build process which harms the review cycle and complicates release voting.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ozhurakousky Oleg Zhurakousky
            joewitt Joe Witt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment