changeset 31807:3bd38a739ea1

8081734: ConcurrentHashMap/ConcurrentAssociateTest.java, times out 90% of time on sparc with 256 cpu. Reviewed-by: chegar
author darcy
date Mon, 20 Jul 2015 15:13:50 -0700
parents 1af94721a340
children 9fdbb78f30a4 418e0d8d9b09
files jdk/test/java/util/concurrent/ConcurrentHashMap/ConcurrentAssociateTest.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/java/util/concurrent/ConcurrentHashMap/ConcurrentAssociateTest.java	Mon Jul 20 13:11:20 2015 -0700
+++ b/jdk/test/java/util/concurrent/ConcurrentHashMap/ConcurrentAssociateTest.java	Mon Jul 20 15:13:50 2015 -0700
@@ -120,7 +120,8 @@
             }
         };
 
-        int ps = Runtime.getRuntime().availableProcessors();
+        // Bound concurrency to avoid degenerate performance
+        int ps = Math.min(Runtime.getRuntime().availableProcessors(), 32);
         Stream<CompletableFuture> runners = IntStream.range(0, ps)
                 .mapToObj(i -> sr.get())
                 .map(CompletableFuture::runAsync);