This sounds like something I’m about to come up against so I’ve raised 
NIFI-1376 for it and pushed up a possible fix that allows TestRunner to return 
a list of logged messages for each level (e.g. info, warn etc). TestRunner also 
provides access to any Controller Service log messages if necessary.

Does this sound helpful? If the pull request needs any work let me know, at the 
very least I suspect I need to put project copyright notices on the new classes.

Cheers,
Richard


> On 9 Jan 2016, at 16:37, Oleg Zhurakousky <[email protected]> 
> wrote:
> 
> Are you looking for something similar to this:
> http://stackoverflow.com/questions/1827677/how-to-do-a-junit-assert-on-a-message-in-a-logger
> Sent from my iPhone
> 
> On Jan 9, 2016, at 09:06, DAVID SMITH 
> <[email protected]<mailto:[email protected]>> wrote:
> 
> Hi
> Does anyone know how to test for logging messages generated by my processors 
> in my Juint tests for that processor?I am trying to determine whilst testing 
> my processor if I have entered an exception, where I would just normally log 
> a warning or an Error but necessarily end up on the failure relationship.
> Is there a good example of this anywhere within the current codebase?
> Many thanksDave

Reply via email to