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

Comparing jsr166/src/test/tck/ForkJoinPool8Test.java (file contents):
Revision 1.26 by jsr166, Sat Nov 1 16:02:23 2014 UTC vs.
Revision 1.28 by jsr166, Wed Dec 31 16:44:01 2014 UTC

# Line 9 | Line 9 | import java.util.concurrent.Cancellation
9   import java.util.concurrent.ExecutionException;
10   import java.util.concurrent.ForkJoinPool;
11   import java.util.concurrent.ForkJoinTask;
12 import java.util.concurrent.ForkJoinWorkerThread;
12   import java.util.concurrent.RecursiveAction;
13   import java.util.concurrent.CountedCompleter;
15 import java.util.concurrent.ThreadLocalRandom;
16 import java.util.concurrent.TimeUnit;
14   import java.util.concurrent.TimeoutException;
15   import static java.util.concurrent.TimeUnit.SECONDS;
16   import static java.util.concurrent.TimeUnit.MILLISECONDS;
20 import java.util.Arrays;
17   import java.util.HashSet;
18  
19   public class ForkJoinPool8Test extends JSR166TestCase {
# Line 479 | Line 475 | public class ForkJoinPool8Test extends J
475                  FailingFibAction f = new FailingFibAction(8);
476                  assertSame(f, f.fork());
477                  try {
478 <                    f.get(5L, TimeUnit.SECONDS);
478 >                    f.get(5L, SECONDS);
479                      shouldThrow();
480                  } catch (ExecutionException success) {
481                      Throwable cause = success.getCause();
# Line 1541 | Line 1537 | public class ForkJoinPool8Test extends J
1537       * timeout elapsed
1538       */
1539      public void testAwaitQuiescence2() throws Exception {
1540 +        /**
1541 +         * """It is possible to disable or limit the use of threads in the
1542 +         * common pool by setting the parallelism property to zero. However
1543 +         * doing so may cause unjoined tasks to never be executed."""
1544 +         */
1545 +        if ("0".equals(System.getProperty(
1546 +             "java.util.concurrent.ForkJoinPool.common.parallelism")))
1547 +            return;
1548          final ForkJoinPool p = new ForkJoinPool();
1549          try {
1550              assertTrue(p.isQuiescent());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines