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

Comparing jsr166/src/test/tck/ThreadPoolExecutorTest.java (file contents):
Revision 1.100 by jsr166, Mon Oct 5 21:42:49 2015 UTC vs.
Revision 1.101 by jsr166, Mon Oct 5 21:54:33 2015 UTC

# Line 614 | Line 614 | public class ThreadPoolExecutorTest exte
614              new ThreadPoolExecutor(1, 1,
615                                     LONG_DELAY_MS, MILLISECONDS,
616                                     q);
617 <        try (PoolCleaner cleaner = cleaner(p)) {
617 >        try (PoolCleaner cleaner = cleaner(p, done)) {
618              FutureTask[] tasks = new FutureTask[5];
619              for (int i = 0; i < tasks.length; i++) {
620                  Callable task = new CheckedCallable<Boolean>() {
# Line 626 | Line 626 | public class ThreadPoolExecutorTest exte
626                  tasks[i] = new FutureTask(task);
627                  p.execute(tasks[i]);
628              }
629 <            assertTrue(threadStarted.await(MEDIUM_DELAY_MS, MILLISECONDS));
629 >            assertTrue(threadStarted.await(LONG_DELAY_MS, MILLISECONDS));
630              assertEquals(tasks.length, p.getTaskCount());
631              assertEquals(tasks.length - 1, q.size());
632              assertEquals(1L, p.getActiveCount());
# Line 639 | Line 639 | public class ThreadPoolExecutorTest exte
639              p.purge();         // Nothing to do
640              assertEquals(tasks.length - 3, q.size());
641              assertEquals(tasks.length - 2, p.getTaskCount());
642            done.countDown();
642          }
643      }
644  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines