This test has had occasional failures for years, possibly forever.
A previous update made the test "othervm" which removed some interruptions, but 
a time accounting problem remains.

This change adds a simple sleep after observing that the test threads are all 
sleeping.

The idea is that threads may not have actually started sleeping when we observe 
their java.lang.Thread.State as WAITING, they may use some CPU time after that 
in order to actually get to sleep.

-------------

Commit messages:
 - 8335124: com/sun/management/ThreadMXBean/ThreadCpuTimeArray.java failed with 
CPU time out of expected range

Changes: https://git.openjdk.org/jdk/pull/19924/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19924&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8335124
  Stats: 3 lines in 1 file changed: 2 ins; 1 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/19924.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19924/head:pull/19924

PR: https://git.openjdk.org/jdk/pull/19924

Reply via email to