简体   繁体   中英

Junit test for nifi processor which extends abstract class

how to write Junit test for nifi processor which extends abstract class

public class myProcessor extends AbstractDatabaseFetchProcessor {

@Override
public void onTrigger(final ProcessContext context, final ProcessSessionFactory sessionFactory)
        throws ProcessException {

}

Where the database connection is created from the connection pool DBCPService and some PropertyDescriptors are fetching from the abstract class AbstractDatabaseFetchProcessor.

Im using TestRunner from apache nifi.I would like to mock the database connection and would like to know how to set the controllerService(for connection) as testRunner property.

I'm new to nifi, Can anybody help me?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM