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.49 by jsr166, Sun Oct 4 00:30:50 2015 UTC vs.
Revision 1.50 by jsr166, Sun Oct 4 00:40:33 2015 UTC

# Line 230 | Line 230 | public class ThreadPoolExecutorSubclassT
230       * execute successfully executes a runnable
231       */
232      public void testExecute() throws InterruptedException {
233 <        try (PoolCleaner<CustomTPE> cleaner =
234 <             cleaner(new CustomTPE(1, 1,
235 <                                   2 * LONG_DELAY_MS, MILLISECONDS,
236 <                                   new ArrayBlockingQueue<Runnable>(10)))) {
237 <            final ThreadPoolExecutor p = cleaner.pool;
233 >        final ThreadPoolExecutor p =
234 >            new CustomTPE(1, 1,
235 >                          2 * LONG_DELAY_MS, MILLISECONDS,
236 >                          new ArrayBlockingQueue<Runnable>(10));
237 >        try (PoolCleaner<ThreadPoolExecutor> cleaner = cleaner(p)) {
238              final CountDownLatch done = new CountDownLatch(1);
239              final Runnable task = new CheckedRunnable() {
240 <                public void realRun() { done.countDown();
241 <                }};
240 >                public void realRun() { done.countDown(); }};
241              p.execute(task);
242              assertTrue(done.await(LONG_DELAY_MS, MILLISECONDS));
243          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines