--- a/test/jdk/java/lang/management/ThreadMXBean/ResetPeakThreadCount.java Thu Oct 25 17:06:40 2018 -0700
+++ b/test/jdk/java/lang/management/ThreadMXBean/ResetPeakThreadCount.java Thu Oct 25 18:41:26 2018 -0700
@@ -158,10 +158,6 @@
" Expected to be == previous peak = " + peak1 + " + " +
delta);
}
- // wait until the current thread count gets incremented
- while (mbean.getThreadCount() < (current + count)) {
- Thread.sleep(100);
- }
current = mbean.getThreadCount();
System.out.println(" Live thread count before returns " + current);
return current;
@@ -195,12 +191,6 @@
allThreads[i].join();
}
- // there is a race in the counter update logic somewhere causing
- // the thread counters go ff
- // we need to give the terminated threads some extra time to really die
- // JDK-8021335
- Thread.sleep(500);
-
long current = mbean.getThreadCount();
System.out.println(" Live thread count before returns " + current);
return current;