215 |
|
new ThreadPoolExecutor(2, 2, |
216 |
|
1000, MILLISECONDS, |
217 |
|
new ArrayBlockingQueue<Runnable>(10)); |
218 |
< |
assertEquals(1, p.getKeepAliveTime(TimeUnit.SECONDS)); |
218 |
> |
assertEquals(1, p.getKeepAliveTime(SECONDS)); |
219 |
|
joinPool(p); |
220 |
|
} |
221 |
|
|
990 |
|
public void testInterruptedSubmit() throws InterruptedException { |
991 |
|
final ThreadPoolExecutor p = |
992 |
|
new ThreadPoolExecutor(1, 1, |
993 |
< |
60, TimeUnit.SECONDS, |
993 |
> |
60, SECONDS, |
994 |
|
new ArrayBlockingQueue<Runnable>(10)); |
995 |
|
|
996 |
|
final CountDownLatch threadStarted = new CountDownLatch(1); |
2010 |
|
done.countDown(); |
2011 |
|
}}; |
2012 |
|
final ThreadPoolExecutor p = |
2013 |
< |
new ThreadPoolExecutor(1, 30, 60, TimeUnit.SECONDS, |
2013 |
> |
new ThreadPoolExecutor(1, 30, |
2014 |
> |
60, SECONDS, |
2015 |
|
new ArrayBlockingQueue(30)); |
2016 |
|
try { |
2017 |
|
for (int i = 0; i < nTasks; ++i) { |