> On 11 Nov 2017, at 07:58, Stefan Zobel <splitera...@gmail.com> wrote: > > In CustomFJPoolTest#testCustomPools() > >>> assertEquals(splitsForPC, splitsForPHalfC * 2); > > > I'm sure I'm slow on the uptake, but isn't this bound to > fail for every commonParallelism == 2^n + 1 in the closed > range [2, 127], i.e., for 3, 5, 9, 17, 33, 65? >
Ooops! yes, thanks for catching that. I updated the test to do this: assertTrue(splitsForPHalfC < splitsForPC); assertEquals(splitsForPC / splitsForPHalfC, nearestPowerOfTwo(commonParallelism) / nearestPowerOfTwo(commonParallelism / 2)); http://cr.openjdk.java.net/~psandoz/jdk10/JDK-8190974-par-stream-custom-pool/webrev/test/jdk/java/util/stream/CustomFJPoolTest.java.html Paul.