ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/ForkJoinPoolTest.java
(Generate patch)

Comparing jsr166/src/test/tck/ForkJoinPoolTest.java (file contents):
Revision 1.11 by jsr166, Sat Nov 21 20:02:13 2009 UTC vs.
Revision 1.14 by jsr166, Tue Dec 1 06:47:14 2009 UTC

# Line 412 | Line 412 | public class ForkJoinPoolTest extends JS
412              p.execute(f);
413              assertTrue(p.getPoolSize() >= 4);
414              int r = f.get();
415 <            assertTrue(r ==  832040);
415 >            assertTrue(r == 832040);
416          } finally {
417              p.shutdownNow(); // don't wait out shutdown
418          }
# Line 590 | Line 590 | public class ForkJoinPoolTest extends JS
590              Object result = future.get();
591              shouldThrow();
592          } catch (ExecutionException success) {
593 +            assertTrue(success.getCause() instanceof IndexOutOfBoundsException);
594          } finally {
595              Policy.setPolicy(savedPolicy);
596          }
# Line 629 | Line 630 | public class ForkJoinPoolTest extends JS
630          final ForkJoinPool p = new ForkJoinPool(1);
631  
632          Thread t = new Thread(new CheckedInterruptedRunnable() {
633 <            void realRun() throws Throwable {
633 >            public void realRun() throws Throwable {
634                  p.submit(new CheckedCallable<Object>() {
635                      public Object realCall() throws Throwable {
636                          try {
# Line 661 | Line 662 | public class ForkJoinPoolTest extends JS
662                      return Boolean.TRUE;
663                  }}).get();
664              shouldThrow();
665 <        } catch (ExecutionException success) {}
665 >        } catch (ExecutionException success) {
666 >            assertTrue(success.getCause() instanceof ArithmeticException);
667 >        }
668  
669          joinPool(p);
670      }
# Line 744 | Line 747 | public class ForkJoinPoolTest extends JS
747              e.invokeAny(l);
748              shouldThrow();
749          } catch (ExecutionException success) {
750 +            assertTrue(success.getCause() instanceof NullPointerException);
751          } finally {
752              joinPool(e);
753          }
# Line 825 | Line 829 | public class ForkJoinPoolTest extends JS
829                  future.get();
830              shouldThrow();
831          } catch (ExecutionException success) {
832 +            assertTrue(success.getCause() instanceof NullPointerException);
833          } finally {
834              joinPool(e);
835          }
# Line 1021 | Line 1026 | public class ForkJoinPoolTest extends JS
1026                  future.get();
1027              shouldThrow();
1028          } catch (ExecutionException success) {
1029 +            assertTrue(success.getCause() instanceof NullPointerException);
1030          } finally {
1031              joinPool(e);
1032          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines