[
https://issues.apache.org/jira/browse/NIFI-2474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15407828#comment-15407828
]
ASF subversion and git services commented on NIFI-2474:
-------------------------------------------------------
Commit 1db5e73102adf0704a8050a0837eda3ad9d5ca2d in nifi's branch
refs/heads/master from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=1db5e73 ]
NIFI-2474: Remove VariableRegistry from outward facing API so that the it is
more flexible to evolve
Signed-off-by: Yolanda M. Davis <[email protected]>
This closes #782
> TestRunner should not expose a VariableRegistry construct
> ---------------------------------------------------------
>
> Key: NIFI-2474
> URL: https://issues.apache.org/jira/browse/NIFI-2474
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Tools and Build
> Reporter: Mark Payne
> Assignee: Mark Payne
> Fix For: 1.0.0
>
>
> Currently, the TestRunners class provides a mechanism for creating a
> TestRunner that takes in a Variable Registry. The concept of providing
> variables to the Test Runner is very valuable. However, the notion of the
> VariableRegistry is an internal implementation detail that is getting
> exposed, creating a leaky abstraction.
> We should remove the override of the createTestRunner() method that takes the
> Variable Registry and instead expose a set of methods of TestRunner:
> void setVariable(String name, String value)
> String getVariable(String name)
> void setVariables(Map<String, String> variables)
> Map<String, String> getVariables()
> Additionally, as-is, if no VariableRegistry is provided, the default is to
> use a Variable Registry that provides System and Environment variables. This
> should be avoided, as it encourages unit tests to depend on
> environment-specific settings.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)