[
https://issues.apache.org/jira/browse/NIFI-4147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16097398#comment-16097398
]
ASF subversion and git services commented on NIFI-4147:
-------------------------------------------------------
Commit 082919f91987dc86e5acce5cda50a5385e031a5e in nifi's branch
refs/heads/master from [[email protected]]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=082919f ]
NIFI-4147 Refactor RunNiFi for Testability
Class org.apache.nifi.bootstrap.RunNiFi is not designed with extensibility
in mind: changes to allow RunNiFi to be subclassed in a test harness
Signed-off-by: James Wing <[email protected]>
This closes #1972.
> Class org.apache.nifi.bootstrap.RunNiFi is not designed with extensibility in
> mind
> ----------------------------------------------------------------------------------
>
> Key: NIFI-4147
> URL: https://issues.apache.org/jira/browse/NIFI-4147
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework
> Reporter: Peter Horvath
>
> 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.*
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)