699 |
|
} |
700 |
|
|
701 |
|
/** |
702 |
< |
* shutdownNow returns a list containing tasks that were not run |
702 |
> |
* shutdownNow returns a list containing tasks that were not run, |
703 |
> |
* and those tasks are drained from the queue |
704 |
|
*/ |
705 |
|
public void testShutdownNow() { |
706 |
|
ThreadPoolExecutor p = new CustomTPE(1, 1, LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10)); |
715 |
|
} catch (SecurityException ok) { return; } |
716 |
|
} |
717 |
|
assertTrue(p.isShutdown()); |
718 |
+ |
assertTrue(p.getQueue().isEmpty()); |
719 |
|
assertTrue(l.size() <= 4); |
720 |
|
} |
721 |
|
|