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

Comparing jsr166/src/test/tck/ThreadPoolExecutorSubclassTest.java (file contents):
Revision 1.88 by jsr166, Tue Oct 6 00:41:47 2015 UTC vs.
Revision 1.89 by jsr166, Tue Oct 6 05:12:16 2015 UTC

# Line 260 | Line 260 | public class ThreadPoolExecutorSubclassT
260                  public void realRun() throws InterruptedException {
261                      threadStarted.countDown();
262                      assertEquals(1, p.getActiveCount());
263 <                    done.await();
263 >                    await(done);
264                  }});
265              assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
266              assertEquals(1, p.getActiveCount());
# Line 488 | Line 488 | public class ThreadPoolExecutorSubclassT
488                  p.execute(new CheckedRunnable() {
489                      public void realRun() throws InterruptedException {
490                          threadsStarted.countDown();
491 <                        done.await();
491 >                        await(done);
492                          assertEquals(THREADS, p.getLargestPoolSize());
493                      }});
494              assertTrue(threadsStarted.await(LONG_DELAY_MS, MILLISECONDS));
# Line 532 | Line 532 | public class ThreadPoolExecutorSubclassT
532                  public void realRun() throws InterruptedException {
533                      threadStarted.countDown();
534                      assertEquals(1, p.getPoolSize());
535 <                    done.await();
535 >                    await(done);
536                  }});
537              assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
538              assertEquals(1, p.getPoolSize());
# Line 556 | Line 556 | public class ThreadPoolExecutorSubclassT
556              p.execute(new CheckedRunnable() {
557                  public void realRun() throws InterruptedException {
558                      threadStarted.countDown();
559 <                    done.await();
559 >                    await(done);
560                  }});
561              assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
562              assertEquals(1, p.getTaskCount());
# Line 567 | Line 567 | public class ThreadPoolExecutorSubclassT
567                      public void realRun() throws InterruptedException {
568                          threadStarted.countDown();
569                          assertEquals(1 + TASKS, p.getTaskCount());
570 <                        done.await();
570 >                        await(done);
571                      }});
572              }
573              assertEquals(1 + TASKS, p.getTaskCount());
# Line 608 | Line 608 | public class ThreadPoolExecutorSubclassT
608                  public void realRun() throws InterruptedException {
609                      assertFalse(p.isTerminating());
610                      threadStarted.countDown();
611 <                    done.await();
611 >                    await(done);
612                  }});
613              assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
614              assertFalse(p.isTerminating());
# Line 636 | Line 636 | public class ThreadPoolExecutorSubclassT
636                  public void realRun() throws InterruptedException {
637                      assertFalse(p.isTerminating());
638                      threadStarted.countDown();
639 <                    done.await();
639 >                    await(done);
640                  }});
641              assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
642              assertFalse(p.isTerminating());
# Line 666 | Line 666 | public class ThreadPoolExecutorSubclassT
666                      public Boolean realCall() throws InterruptedException {
667                          threadStarted.countDown();
668                          assertSame(q, p.getQueue());
669 <                        done.await();
669 >                        await(done);
670                          return Boolean.TRUE;
671                      }};
672                  tasks[i] = new FutureTask(task);
# Line 698 | Line 698 | public class ThreadPoolExecutorSubclassT
698                  tasks[i] = new CheckedRunnable() {
699                      public void realRun() throws InterruptedException {
700                          threadStarted.countDown();
701 <                        done.await();
701 >                        await(done);
702                      }};
703                  p.execute(tasks[i]);
704              }
# Line 733 | Line 733 | public class ThreadPoolExecutorSubclassT
733                  Callable task = new CheckedCallable<Boolean>() {
734                      public Boolean realCall() throws InterruptedException {
735                          threadStarted.countDown();
736 <                        done.await();
736 >                        await(done);
737                          return Boolean.TRUE;
738                      }};
739                  tasks[i] = new FutureTask(task);
# Line 1144 | Line 1144 | public class ThreadPoolExecutorSubclassT
1144              final CountDownLatch done = new CountDownLatch(1);
1145              Runnable task = new CheckedRunnable() {
1146                  public void realRun() throws InterruptedException {
1147 <                    done.await();
1147 >                    await(done);
1148                  }};
1149              for (int i = 0; i < 2; ++i)
1150                  p.execute(task);
# Line 1172 | Line 1172 | public class ThreadPoolExecutorSubclassT
1172              final CountDownLatch done = new CountDownLatch(1);
1173              Runnable blocker = new CheckedRunnable() {
1174                  public void realRun() throws InterruptedException {
1175 <                    done.await();
1175 >                    await(done);
1176                  }};
1177              p.execute(blocker);
1178              TrackedNoOpRunnable[] tasks = new TrackedNoOpRunnable[5];

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines