8081734: ConcurrentHashMap/ConcurrentAssociateTest.java, times out 90% of time on sparc with 256 cpu

Reviewed-by: chegar
This commit is contained in:
Joe Darcy 2015-07-20 15:13:50 -07:00
parent 8b236a44de
commit 6e48caf250

View File

@ -120,7 +120,8 @@ public class ConcurrentAssociateTest {
}
};
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);