--- jsr166/src/test/tck/ForkJoinPoolTest.java 2009/08/03 22:08:07 1.6 +++ jsr166/src/test/tck/ForkJoinPoolTest.java 2009/08/04 21:10:19 1.8 @@ -416,7 +416,7 @@ public class ForkJoinPoolTest extends JS int r = f.get(); assertTrue(r == 832040); } finally { - joinPool(p); + p.shutdownNow(); // don't wait out shutdown } } @@ -636,7 +636,10 @@ public class ForkJoinPoolTest extends JS void realRun() throws Throwable { p.submit(new CheckedCallable() { public Object realCall() throws Throwable { - Thread.sleep(MEDIUM_DELAY_MS); + try { + Thread.sleep(MEDIUM_DELAY_MS); + } catch (InterruptedException ok) { + } return null; }}).get(); }}); @@ -644,6 +647,8 @@ public class ForkJoinPoolTest extends JS t.start(); Thread.sleep(SHORT_DELAY_MS); t.interrupt(); + t.join(); + p.shutdownNow(); joinPool(p); } @@ -653,18 +658,12 @@ public class ForkJoinPoolTest extends JS */ public void testSubmitEE() throws Throwable { ForkJoinPool p = new ForkJoinPool(1); - try { - Callable c = new Callable() { - public Object call() { - int i = 5/0; - return Boolean.TRUE; - } - }; - - for (int i = 0; i < 5; i++) { - p.submit(c).get(); - } + p.submit(new Callable() { + public Object call() { + int i = 5/0; + return Boolean.TRUE; + }}).get(); shouldThrow(); } catch (ExecutionException success) { }