changeset 42318:35806bea1e90

8169243: java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java still fails intermittently Reviewed-by: martin, smarks, psandoz, amlu
author dl
date Mon, 28 Nov 2016 23:33:25 -0800
parents debe8d32a0a4
children 0193886267c3
files jdk/test/java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java	Mon Nov 28 17:32:49 2016 -0800
+++ b/jdk/test/java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java	Mon Nov 28 23:33:25 2016 -0800
@@ -247,7 +247,13 @@
                tg.activeCount() > 0)
             Thread.sleep(4);
         equal(tg.activeCount(), 0);
-        check(System.nanoTime() - t0 >= tpe.getKeepAliveTime(NANOSECONDS));
+
+        // The following assertion is almost always true, but may
+        // exceptionally not be during a transition from core count
+        // too high to allowCoreThreadTimeOut.  Users will never
+        // notice, and we accept the small loss of testability.
+        //
+        // check(System.nanoTime() - t0 >= tpe.getKeepAliveTime(NANOSECONDS));
 
         //report("idle", tpe);