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

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

Github user PuspenduBanerjee commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/534#discussion_r67446830
  
    --- Diff: 
nifi-mock/src/main/java/org/apache/nifi/util/MockProcessSession.java ---
    @@ -793,13 +798,21 @@ private void validateState(final FlowFile flowFile) {
                 throw new FlowFileHandlingException(flowFile + " is not the 
most recent version of this flow file within this session");
             }
     
    +
             for (final List<MockFlowFile> flowFiles : transferMap.values()) {
                 if (flowFiles.contains(flowFile)) {
                     throw new IllegalStateException(flowFile + " has already 
been transferred");
                 }
             }
         }
     
    +    private void validateDestinationRelation(final Relationship 
relationship) {
    +        if (!relationships.contains(relationship)) {
    +            rollback();
    --- End diff --
    
    I think, though it's for testing purpose , we should emulate as real as we 
can and rollback is the best possible way to revert back to a stable state. 
And, in a real context we may face such issue in case of orchestration, where 
an attribute in a flowfile may finally dictate where it should be transferred.


> Groovy Test Scripts will require refactoring if we implement NIFI-1152
> ----------------------------------------------------------------------
>
>                 Key: NIFI-1838
>                 URL: https://issues.apache.org/jira/browse/NIFI-1838
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.0.0, 0.6.1
>            Reporter: Puspendu Banerjee
>              Labels: patch
>             Fix For: 1.0.0
>
>         Attachments: 
> 0001-Fix-for-NIFI-1838-NIFI-1152-Code-modification-for-ty.patch
>
>
> Groovy Test Scripts will require refractoring we implement NIFI-1152 as they 
> don't define Relationships properly



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to