--- jsr166/src/test/tck/ForkJoinTaskTest.java 2010/10/24 13:41:17 1.20 +++ jsr166/src/test/tck/ForkJoinTaskTest.java 2010/11/18 11:44:29 1.22 @@ -26,7 +26,7 @@ public class ForkJoinTaskTest extends JS } // Runs with "mainPool" use > 1 thread. singletonPool tests use 1 - static final int mainPoolSize = + static final int mainPoolSize = Math.max(2, Runtime.getRuntime().availableProcessors()); private static ForkJoinPool mainPool() { @@ -438,7 +438,7 @@ public class ForkJoinTaskTest extends JS assertTrue(cause instanceof FJException); assertTrue(f.isDone()); assertTrue(f.isCompletedAbnormally()); - assertSame(cause, f.getException()); + assertSame(cause.getClass(), f.getException().getClass()); } }}; testInvokeOnPool(mainPool(), a); @@ -460,7 +460,7 @@ public class ForkJoinTaskTest extends JS assertTrue(cause instanceof FJException); assertTrue(f.isDone()); assertTrue(f.isCompletedAbnormally()); - assertSame(cause, f.getException()); + assertSame(cause.getClass(), f.getException().getClass()); } }}; testInvokeOnPool(mainPool(), a); @@ -1166,7 +1166,7 @@ public class ForkJoinTaskTest extends JS assertTrue(cause instanceof FJException); assertTrue(f.isDone()); assertTrue(f.isCompletedAbnormally()); - assertSame(cause, f.getException()); + assertSame(cause.getClass(), f.getException().getClass()); } }}; testInvokeOnPool(singletonPool(), a); @@ -1188,7 +1188,7 @@ public class ForkJoinTaskTest extends JS assertTrue(cause instanceof FJException); assertTrue(f.isDone()); assertTrue(f.isCompletedAbnormally()); - assertSame(cause, f.getException()); + assertSame(cause.getClass(), f.getException().getClass()); } }}; testInvokeOnPool(singletonPool(), a);