[
https://issues.apache.org/jira/browse/NIFI-5871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16710365#comment-16710365
]
ASF GitHub Bot commented on NIFI-5871:
--------------------------------------
Github user MikeThomsen commented on a diff in the pull request:
https://github.com/apache/nifi/pull/3203#discussion_r239160879
--- Diff:
nifi-mock/src/main/java/org/apache/nifi/util/MockProcessSession.java ---
@@ -496,7 +496,10 @@ public MockFlowFile putAllAttributes(FlowFile
flowFile, final Map<String, String
final MockFlowFile newFlowFile = new MockFlowFile(mock.getId(),
flowFile);
currentVersions.put(newFlowFile.getId(), newFlowFile);
- newFlowFile.putAttributes(attrs);
+ Map<String, String> attrCopy = new HashMap<>();
+ attrCopy.putAll(attrs);
--- End diff --
Only change I'd make here is putting that into the constructor. Other than
that LGTM.
> MockProcessSession.putAllAttributes should ignore the UUID attribute
> --------------------------------------------------------------------
>
> Key: NIFI-5871
> URL: https://issues.apache.org/jira/browse/NIFI-5871
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.8.0
> Reporter: Alex Savitsky
> Priority: Major
>
> Currently, the method would copy all attributes indiscriminately, but the
> interface Javadoc specifically states that the attribute "uuid" should be
> ignored. This leads to issues with testing, where two distinct flow files are
> considered same in the session.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)