You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Russell Bateman <ru...@windofkeltia.com> on 2025/05/30 17:12:00 UTC
How to set both run duration and run schedule in the test runner...
...when writing a test case for a custom processor?
Re: How to set both run duration and run schedule in the test runner...
Posted by Russell Bateman <ru...@windofkeltia.com>.
Let me add some code to illustrate. I can only find
runner.setRunSchedule()and no runner.setRunDuration().
import org.apache.nifi.util.TestRunner;
import org.apache.nifi.util.TestRunners;
@Test
public void test()
{
private TestRunnerrunner = TestRunners.newTestRunner( processor = new/processor-name/() ); ;
runner.setRunSchedule( ( long )/milliseconds/ );
runner.enqueue(/flowfile-content-as-a-stream/ );
runner.run(1 );
}
On 5/30/25 11:12, Russell Bateman wrote:
> ...when writing a test case for a custom processor?