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.41 by jsr166, Mon Sep 28 02:41:29 2015 UTC vs.
Revision 1.43 by jsr166, Mon Sep 28 08:23:49 2015 UTC

# Line 711 | Line 711 | public class ThreadPoolExecutorSubclassT
711              new CustomTPE(poolSize, poolSize, LONG_DELAY_MS, MILLISECONDS,
712                            new ArrayBlockingQueue<Runnable>(10));
713          CountDownLatch threadsStarted = new CountDownLatch(poolSize);
714 <        CheckedRunnable waiter = new CheckedRunnable() { public void realRun() {
714 >        Runnable waiter = new CheckedRunnable() { public void realRun() {
715              threadsStarted.countDown();
716              try {
717                  MILLISECONDS.sleep(2 * LONG_DELAY_MS);
# Line 721 | Line 721 | public class ThreadPoolExecutorSubclassT
721          for (int i = 0; i < count; i++)
722              p.execute(waiter);
723          assertTrue(threadsStarted.await(LONG_DELAY_MS, MILLISECONDS));
724 +        assertEquals(poolSize, p.getActiveCount());
725 +        assertEquals(0, p.getCompletedTaskCount());
726          final List<Runnable> queuedTasks;
727          try {
728              queuedTasks = p.shutdownNow();
# Line 733 | Line 735 | public class ThreadPoolExecutorSubclassT
735          assertTrue(p.awaitTermination(LONG_DELAY_MS, MILLISECONDS));
736          assertTrue(p.isTerminated());
737          assertEquals(poolSize, ran.get());
738 +        assertEquals(poolSize, p.getCompletedTaskCount());
739      }
740  
741      // Exception Tests

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines