[jira] [Commented] (NIFI-5055) Need ability to un-penalize MockFlowFile
[ https://issues.apache.org/jira/browse/NIFI-5055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16433918#comment-16433918 ] ASF GitHub Bot commented on NIFI-5055: -- Github user markobean closed the pull request at: https://github.com/apache/nifi/pull/2617 > 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 > Fix For: 1.7.0 > > > 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)
[jira] [Commented] (NIFI-5055) Need ability to un-penalize MockFlowFile
[ https://issues.apache.org/jira/browse/NIFI-5055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16433919#comment-16433919 ] ASF GitHub Bot commented on NIFI-5055: -- Github user markobean commented on the issue: https://github.com/apache/nifi/pull/2617 Changes committed to master. Closing PR. > 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 > Fix For: 1.7.0 > > > 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)
[jira] [Commented] (NIFI-5055) Need ability to un-penalize MockFlowFile
[ https://issues.apache.org/jira/browse/NIFI-5055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16433537#comment-16433537 ] ASF GitHub Bot commented on NIFI-5055: -- Github user pvillard31 commented on the issue: https://github.com/apache/nifi/pull/2617 That's correct @markobean - it has been merged into master with 274ed46d923e7d080b57ed121596b4ecfa997a2c. > 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)
[jira] [Commented] (NIFI-5055) Need ability to un-penalize MockFlowFile
[ https://issues.apache.org/jira/browse/NIFI-5055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16433280#comment-16433280 ] ASF GitHub Bot commented on NIFI-5055: -- Github user markobean commented on the issue: https://github.com/apache/nifi/pull/2617 So, does this PR need to be manually closed with the "Close and comment" button? > 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)
[jira] [Commented] (NIFI-5055) Need ability to un-penalize MockFlowFile
[ https://issues.apache.org/jira/browse/NIFI-5055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16433033#comment-16433033 ] ASF GitHub Bot commented on NIFI-5055: -- Github user MikeThomsen commented on the issue: https://github.com/apache/nifi/pull/2617 @pvillard31 Thanks. I finally figured it out after doing a second one today. > 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)
[jira] [Commented] (NIFI-5055) Need ability to un-penalize MockFlowFile
[ https://issues.apache.org/jira/browse/NIFI-5055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16433020#comment-16433020 ] ASF GitHub Bot commented on NIFI-5055: -- Github user pvillard31 commented on the issue: https://github.com/apache/nifi/pull/2617 @MikeThomsen - just fyi, while merging a PR it's highly recommended to amend the commit message to include the magic words that will automatically close the github PR. The commands I usually execute when merging a PR are: git checkout master git pull origin master git fetch github git checkout github/pr/ git checkout -b pr --- here you can do additional reviewing, maven builds, test with a running instance, etc --- git commit --amend -s --- you update the commit message to include "This closes #." git log --- the above command is to retrieve the commit ID --- git checkout master git cherry-pick git push origin master This is an example - there are probably other ways to do it. > 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)
[jira] [Commented] (NIFI-5055) Need ability to un-penalize MockFlowFile
[ https://issues.apache.org/jira/browse/NIFI-5055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16432870#comment-16432870 ] ASF GitHub Bot commented on NIFI-5055: -- Github user MikeThomsen commented on the issue: https://github.com/apache/nifi/pull/2617 @markobean You close the PR now. I merged the change. > 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)
[jira] [Commented] (NIFI-5055) Need ability to un-penalize MockFlowFile
[ https://issues.apache.org/jira/browse/NIFI-5055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16432772#comment-16432772 ] ASF subversion and git services commented on NIFI-5055: --- Commit 274ed46d923e7d080b57ed121596b4ecfa997a2c in nifi's branch refs/heads/master from [~markbean] [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=274ed46 ] NIFI-5055 added ability to unpenalize MockFlowFile directly or from MockProcessSession Signed-off-by: Mike Thomsen > 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)
[jira] [Commented] (NIFI-5055) Need ability to un-penalize MockFlowFile
[ https://issues.apache.org/jira/browse/NIFI-5055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16431641#comment-16431641 ] ASF GitHub Bot commented on NIFI-5055: -- Github user markobean commented on the issue: https://github.com/apache/nifi/pull/2617 Updated to use assertTrue and assertFalse. I had simply borrowed assertEquals from the previous unit test. So, while updating, I updated that test to use assertTrue as well. Commit, squashed and pushed. > 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)
[jira] [Commented] (NIFI-5055) Need ability to un-penalize MockFlowFile
[ https://issues.apache.org/jira/browse/NIFI-5055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16431096#comment-16431096 ] 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_r180204173 --- 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()); +ff1 = session.unpenalize(ff1); +assertEquals(false, ff1.isPenalized()); --- End diff -- Please change to `assertFalse` > 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)
[jira] [Commented] (NIFI-5055) Need ability to un-penalize MockFlowFile
[ 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)
[jira] [Commented] (NIFI-5055) Need ability to un-penalize MockFlowFile
[ https://issues.apache.org/jira/browse/NIFI-5055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16430371#comment-16430371 ] ASF GitHub Bot commented on NIFI-5055: -- Github user ottobackwards commented on the issue: https://github.com/apache/nifi/pull/2617 Looks good to me > 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)
[jira] [Commented] (NIFI-5055) Need ability to un-penalize MockFlowFile
[ https://issues.apache.org/jira/browse/NIFI-5055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16429862#comment-16429862 ] ASF GitHub Bot commented on NIFI-5055: -- GitHub user markobean opened a pull request: https://github.com/apache/nifi/pull/2617 NIFI-5055 added ability to unpenalize MockFlowFile directly or from M… …ockProcessSession Thank you for submitting a contribution to Apache NiFi. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Does your PR title start with NIFI- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? - [ ] Is your initial contribution a single, squashed commit? ### For code changes: - [ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder? - [ ] Have you written or updated unit tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly? - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly? - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties? ### For documentation related changes: - [ ] Have you ensured that format looks appropriate for the output in which it is rendered? ### Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. You can merge this pull request into a Git repository by running: $ git pull https://github.com/markobean/nifi NIFI-5055 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/2617.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 #2617 commit 0e2cc73c4aac0a04a84ad921fed0ce0b0c7cd2a6 Author: Mark Bean Date: 2018-04-08T19:03:09Z NIFI-5055 added ability to unpenalize MockFlowFile directly or from MockProcessSession > 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)
[jira] [Commented] (NIFI-5055) Need ability to un-penalize MockFlowFile
[ https://issues.apache.org/jira/browse/NIFI-5055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16429853#comment-16429853 ] Mark Bean commented on NIFI-5055: - Added ability to unpenalize MockFlowFile directly or from MockProcessSession > 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)