exceptionfactory commented on a change in pull request #5544:
URL: https://github.com/apache/nifi/pull/5544#discussion_r754540393



##########
File path: nifi-mock/src/main/java/org/apache/nifi/util/TestRunner.java
##########
@@ -61,6 +61,13 @@
      */
     ProcessContext getProcessContext();
 
+    /**
+     * Call the {@link org.apache.nifi.annotation.lifecycle.OnScheduled} /
+     * {@link org.apache.nifi.annotation.lifecycle.OnUnscheduled} methods, to 
simulate a processor
+     * that is enabled but never triggered.
+     */
+    void doNotRun();

Review comment:
       Taking another look at the options, an alternative solution might be to 
allow `0` as an acceptable number of `iterations` when calling the `run()` 
method.  Right now that value must be `1` or greater, but with an iteration 
number of `0`, it looks like the TestRunner would call `OnScheduled` and 
`OnUnscheduled`, which would exercise the behavior described.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to