public static void dumpThreads() {
        try {
            ThreadMXBean bean = ManagementFactory.getThreadMXBean();
            ThreadInfo[] infos = bean.dumpAllThreads(true, true);
            for (ThreadInfo info : infos) {
                System.out.println(info);
            }
        } catch (Throwable t) {
            t.printStackTrace(); // NOPMD
        }
    }
Test helper

@author boyan (boyan@alibaba-inc.com)

2018-Apr-11 10:16:07 AM
jraft-extension/java-log-storage-impl/src/test/java/com/alipay/sofa/jraft/test/TestUtils.java