[ 
https://issues.apache.org/jira/browse/NIFI-2474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15406907#comment-15406907
 ] 

ASF GitHub Bot commented on NIFI-2474:
--------------------------------------

GitHub user markap14 opened a pull request:

    https://github.com/apache/nifi/pull/782

    NIFI-2474: Remove VariableRegistry from outward facing API so that th…

    …e it is more flexible to evolve

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/markap14/nifi NIFI-2474

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/782.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #782
    
----
commit 2004ed2fdeaf1190cc8ac8ccb137909b17f07ba2
Author: Mark Payne <[email protected]>
Date:   2016-08-04T00:44:04Z

    NIFI-2474: Remove VariableRegistry from outward facing API so that the it 
is more flexible to evolve

----


> 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
>             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)

Reply via email to