RFR 8076050: java/lang/management/ThreadMXBean/ThreadMXBeanStateTest.java fails intermittently
Staffan Larsen
staffan.larsen at oracle.com
Thu Apr 9 19:00:16 UTC 2015
Looks good!
Thanks,
/Staffan
> On 9 apr 2015, at 20:33, Jaroslav Bachorik <jaroslav.bachorik at oracle.com> wrote:
>
> Please, review the following test change
>
> Issue : https://bugs.openjdk.java.net/browse/JDK-8076050
> Webrev: http://cr.openjdk.java.net/~jbachorik/8076050/webrev.00
>
> This is another intermittently failing test due to timing problems.
>
> The test thread is requested to move to "TIMED_WAITING" state and the main thread then performs the asserts. The test thread will stay in "TIMED_WAITING" state 10s (lock.wait(10000) in test/java/lang/Thread/ThreadStateController.java#168) and after this timeout it moves on. The wait may be cancelled by the main thread after it has performed the asserts.
>
> This timeout might turn out insufficient. The proposed solution is to do `lock.wait(Integer.MAX_VALUE)` instead. Aside of this change I also introduced the usage of `Utils.adjustTimeout(timeout)` to adjust the requested timeouts to the test timeout scaling factor.
>
> The change in test/java/lang/management/ThreadMXBean/ThreadMXBeanStateTest.java is purely for the purpose of improving the log output - currently, when the test fails the output is ignored; and this was fixed.
>
>
> Thanks,
>
> -JB-
More information about the serviceability-dev
mailing list