kaisun2000 commented on a change in pull request #1483:
URL: https://github.com/apache/helix/pull/1483#discussion_r512126947
##########
File path: helix-core/src/test/java/org/apache/helix/ThreadLeakageChecker.java
##########
@@ -189,26 +193,26 @@ public static boolean afterClassCheck(String classname) {
boolean dumpThread = false;
if (categoryThreadCnt > limit) {
checkStatus = false;
- System.out.println(
+ LOG.info(
"Failure " + threadCategory.getDescription() + " has " +
categoryThreadCnt + " thread");
dumpThread = true;
} else if (categoryThreadCnt > warningLimit) {
- System.out.println(
+ LOG.info(
"Warning " + threadCategory.getDescription() + " has " +
categoryThreadCnt + " thread");
dumpThread = true;
} else {
- System.out.println(threadCategory.getDescription() + " has " +
categoryThreadCnt + " thread");
+ LOG.info(threadCategory.getDescription() + " has " +
categoryThreadCnt + " thread");
}
if (!dumpThread) {
continue;
}
// print first 100 thread names
int i = 0;
for (Thread t : threadByCat.get(threadCategory)) {
- System.out.println(i + " thread:" + t.getName());
+ LOG.debug(i + " thread:" + t.getName());
Review comment:
Nit: LOG.info may be better. Otherwise, it is hard for people using it
to see the leaked thread if they wish as they need to turn on debug. which can
result in a lot more other lines.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]