[ 
https://issues.apache.org/jira/browse/NIFI-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15098744#comment-15098744
 ] 

ASF GitHub Bot commented on NIFI-1376:
--------------------------------------

Github user rpmiskin commented on the pull request:

    https://github.com/apache/nifi/pull/165#issuecomment-171761193
  
    @markap14 I chose to provide a Logger implementation to avoid having to 
make many changes to MockProcessorLog, especially as there are a number of 
methods that make two logger calls (e.g. line 162 and line 213).
    
    Additionally it ensure that all messages would be made available to via 
TestRunner even if someone comes along and updates MockProcessorLog with 
additional methods.
    
    @olegz Using the underlying output stream would work, but being able to  
assert on the objects being passed to the logger may be more helpful for the 
tests. There was also a post on the dev list this week about 
testShouldValidatePGPPublicKeyringExists failing due to a platform dependent 
toString(), that suggests that avoiding asserts based on toString() would be 
good. 
    



> Provide access to logged messages from TestRunner
> -------------------------------------------------
>
>                 Key: NIFI-1376
>                 URL: https://issues.apache.org/jira/browse/NIFI-1376
>             Project: Apache NiFi
>          Issue Type: Improvement
>    Affects Versions: 0.4.1
>            Reporter: Richard Miskin
>            Priority: Minor
>             Fix For: 0.5.0
>
>
> It would be useful to be able to verify the log messages raised by Processors 
> and ControllerServices during tests.
> As an example use case, imagine a processor with multiple possible errors 
> that should cause a flow file to be transferred to a failure Relationship, 
> but different messages should be logged.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to