[
https://issues.apache.org/jira/browse/NIFI-5055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16431095#comment-16431095
]
ASF GitHub Bot commented on NIFI-5055:
--------------------------------------
Github user MikeThomsen commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2617#discussion_r180204129
--- Diff:
nifi-mock/src/test/java/org/apache/nifi/util/TestMockProcessSession.java ---
@@ -101,6 +101,17 @@ public void
testKeepPenalizedStatusAfterPuttingAttribute(){
assertEquals(true, ff1.isPenalized());
}
+ @Test
+ public void testUnpenalizeFlowFile() {
+ final Processor processor = new PoorlyBehavedProcessor();
+ final MockProcessSession session = new MockProcessSession(new
SharedSessionState(processor, new AtomicLong(0L)), processor);
+ FlowFile ff1 = session.createFlowFile("hello, world".getBytes());
+ ff1 = session.penalize(ff1);
+ assertEquals(true, ff1.isPenalized());
--- End diff --
A little better if it's `assertTrue`
> Need ability to un-penalize MockFlowFile
> ----------------------------------------
>
> Key: NIFI-5055
> URL: https://issues.apache.org/jira/browse/NIFI-5055
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework
> Affects Versions: 1.6.0
> Reporter: Mark Bean
> Assignee: Mark Bean
> Priority: Major
>
> The MockFlowFile has a method setPenalized() which sets the 'penalized'
> variable to true. And, the isPenalized() method simply returns the value of
> 'penalized'. (In the real world, isPenalized() is time-based.) I believe an
> unsetPenalized() method may be needed.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)