RFR 8058506: ThreadMXBeanStateTest throws exception

Jaroslav Bachorik jaroslav.bachorik at oracle.com
Mon Oct 20 11:12:32 UTC 2014


Please, review the following test change

Issue : https://bugs.openjdk.java.net/browse/JDK-8058506
Webrev: http://cr.openjdk.java.net/~jbachorik/8058506/webrev.00

The test fails intermittently due to the log printing blocking the test 
thread from time to time, resulting in incorrect data reported by 
ThreadMXBean.

The solution is to use per-thread non-blocking StringBuilders (wrapped 
in Formatter instances) and aggregate the log output only after the test 
is finished.

Thanks,

-JB-


More information about the serviceability-dev mailing list