[ https://issues.apache.org/jira/browse/NIFI-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14943548#comment-14943548 ]
Mark Payne edited comment on NIFI-34 at 10/5/15 3:44 PM: --------------------------------------------------------- Another thing that I would like to see here is detecting when the logger is used with the wrong number of arguments. For example: {code} getLogger().warn("Something went wrong with {}", new Object[] {flowFile, exception}); {code} or {code} getLogger().warn("Something went wrong with {} : {}", new Object[] {flowFile}); {code} The mock framework should use a logger that is capable of understanding how many {} pairs we have and look at the number of arguments and ensure that the two align. was (Author: markap14): Another thing that I would like to see here is detecting when the logger is used with the wrong number of arguments (e.g., getLogger().warn("Something went wrong with {}", new Object[] {flowFile, exception}); or getLogger().warn("Something went wrong with {} : {}", new Object[] {flowFile}); The mock framework should use a logger that is capable of understanding how many {} pairs we have and look at the number of arguments and ensure that the two align. > Mock Framework should provide option to detect common bad practices/bugs > ------------------------------------------------------------------------ > > Key: NIFI-34 > URL: https://issues.apache.org/jira/browse/NIFI-34 > Project: Apache NiFi > Issue Type: Improvement > Components: Core Framework > Reporter: Mark Payne > Priority: Minor > > Mock Framework should detect common errors such as: > * Processor has member variable that is a PropertyDescriptor, but the > PropertyDescriptor isn't returned in the list of supported property > descriptors. > * Processor has member variable that is a Relationship, but the Relationship > isn't returned in the Set of Relationships. > * Processor has multiple properties or relationships as member variables with > the same name. > * No META-INF/services file > * META-INF/services file doesn't contain the Component's Fully Qualified > Class Name > * No @CapabilityDescription annotation > * No @Tags annotation > Mock Framework should automatically detect these things and fail the unit > test unless checking is disabled. This requires building an object that > allows developer to enable/disable each of these checks. -- This message was sent by Atlassian JIRA (v6.3.4#6332)