You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2021/03/23 19:17:40 UTC

[GitHub] [nifi] exceptionfactory commented on a change in pull request #4925: NIFI-8356: Add unit test for LongRunningTaskMonitor.

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:
users@infra.apache.org