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

Class org.apache.nifi.bootstrap.RunNiFi is not designed with extensibility in mind

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.4.0
    • Core Framework
    • None

    Description

      Class org.apache.nifi.bootstrap.RunNiFi was not designed with extensibility in mind. This class is used to bootstrap the runtime; the current implementation does not support extending the class with different behaviour, that would be essential to bootstrap the engine within an integration test.

      This class should be changed so that it can be easily subclassed, allowing it to be later extended within an integration test runner:

      • The verbose parameter within the RunNiFi constructor is not used: eliminate it
      • getBootstrapConfFile() is static, which means it cannot easily be overridden in a test stub: replace with an instance method, which can be overridden
      • Methods getPidFile, getStatusFile, getLockFile, getStatusFile are package protected, preventing these methods to be stubbed for an integration test: make them protected so that they can be overridden from a subclass (allowing an integration test runner to override default behaviour in a test run)

      Please note these changes are baby-steps towards the implementation of a NiFi integration test harness.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              peter.gergely.horvath@gmail.com Peter Horvath
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: