Code Review 7021010: java/lang/Thread/ThreadStateTest.java fails intermittently
chris.hegarty at oracle.com
Mon Jun 20 05:54:33 PDT 2011
java/lang/Thread/ThreadStateTest.java can fail with when
checkThreadState finds an unexpected state.
Exception in thread "main" java.lang.RuntimeException: MyThread expected
to have TERMINATED but got RUNNABLE
There is a race between the thread being put in a specific state and the
thread testing for that state. The test should retry the thread state
check a number of times before failing. Also, some minor cleanup and
update to use a more recent j.u.c reusable synchronization barrier.
More information about the core-libs-dev