exceptionfactory commented on a change in pull request #4925:
URL: https://github.com/apache/nifi/pull/4925#discussion_r599861786
##########
File path:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/components/monitor/LongRunningTaskMonitor.java
##########
@@ -72,6 +73,16 @@ public void run() {
}
}
- LOGGER.info("Active threads: {}; Long running threads: {}",
activeThreadCount, longRunningThreadCount);
+ getLogger().info("Active threads: {}; Long running threads: {}",
activeThreadCount, longRunningThreadCount);
+ }
+
+ @VisibleForTesting
Review comment:
Is it necessary to introduce testing for log statements? Testing the
invocation of `EventReport.reportEvent()` seems sufficient since that is the
primary purpose of the monitor. Avoiding evaluating of logging in the unit
test removes the need for exposing these methods for testing purposes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]