Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/1622#discussion_r147885786
--- Diff:
artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
---
@@ -619,34 +623,107 @@ public static void checkWeakReferences(final
WeakReference<?>... references) {
}
public static String threadDump(final String msg) {
- StringWriter str = new StringWriter();
- PrintWriter out = new PrintWriter(str);
- Map<Thread, StackTraceElement[]> stackTrace =
Thread.getAllStackTraces();
+ try (
--- End diff --
Perhaps add a class into util: String ThreadDumpUtil.threadDump()
And call this on both places?
Do you want to take care of this, or should I do it?
---