345 |
|
*/ |
346 |
|
public void testGetKeepAliveTime() { |
347 |
|
ThreadPoolExecutor p = new CustomTPE(2, 2, 1000, MILLISECONDS, new ArrayBlockingQueue<Runnable>(10)); |
348 |
< |
assertEquals(1, p.getKeepAliveTime(TimeUnit.SECONDS)); |
348 |
> |
assertEquals(1, p.getKeepAliveTime(SECONDS)); |
349 |
|
joinPool(p); |
350 |
|
} |
351 |
|
|
1223 |
|
* execute(null) throws NPE |
1224 |
|
*/ |
1225 |
|
public void testExecuteNull() { |
1226 |
< |
ThreadPoolExecutor p = null; |
1226 |
> |
ThreadPoolExecutor p = |
1227 |
> |
new CustomTPE(1, 2, 1L, SECONDS, |
1228 |
> |
new ArrayBlockingQueue<Runnable>(10)); |
1229 |
|
try { |
1228 |
– |
p = new CustomTPE(1,2,LONG_DELAY_MS, MILLISECONDS,new ArrayBlockingQueue<Runnable>(10)); |
1230 |
|
p.execute(null); |
1231 |
|
shouldThrow(); |
1232 |
|
} catch (NullPointerException success) {} |