1070 |
|
* submit(runnable) throws RejectedExecutionException if saturated. |
1071 |
|
*/ |
1072 |
|
public void testSaturatedSubmitRunnable() { |
1073 |
< |
ThreadPoolExecutor p = |
1073 |
> |
final ThreadPoolExecutor p = |
1074 |
|
new ThreadPoolExecutor(1, 1, |
1075 |
|
LONG_DELAY_MS, MILLISECONDS, |
1076 |
|
new ArrayBlockingQueue<Runnable>(1)); |
1099 |
|
* submit(callable) throws RejectedExecutionException if saturated. |
1100 |
|
*/ |
1101 |
|
public void testSaturatedSubmitCallable() { |
1102 |
< |
ThreadPoolExecutor p = |
1102 |
> |
final ThreadPoolExecutor p = |
1103 |
|
new ThreadPoolExecutor(1, 1, |
1104 |
|
LONG_DELAY_MS, MILLISECONDS, |
1105 |
|
new ArrayBlockingQueue<Runnable>(1)); |
1214 |
|
* execute throws RejectedExecutionException if shutdown |
1215 |
|
*/ |
1216 |
|
public void testRejectedExecutionExceptionOnShutdown() { |
1217 |
< |
ThreadPoolExecutor p = |
1217 |
> |
final ThreadPoolExecutor p = |
1218 |
|
new ThreadPoolExecutor(1, 1, |
1219 |
|
LONG_DELAY_MS, MILLISECONDS, |
1220 |
|
new ArrayBlockingQueue<Runnable>(1)); |
1301 |
|
* setCorePoolSize of negative value throws IllegalArgumentException |
1302 |
|
*/ |
1303 |
|
public void testCorePoolSizeIllegalArgumentException() { |
1304 |
< |
ThreadPoolExecutor p = |
1304 |
> |
final ThreadPoolExecutor p = |
1305 |
|
new ThreadPoolExecutor(1, 2, |
1306 |
|
LONG_DELAY_MS, MILLISECONDS, |
1307 |
|
new ArrayBlockingQueue<Runnable>(10)); |
1320 |
|
* given a value less the core pool size |
1321 |
|
*/ |
1322 |
|
public void testMaximumPoolSizeIllegalArgumentException() { |
1323 |
< |
ThreadPoolExecutor p = |
1323 |
> |
final ThreadPoolExecutor p = |
1324 |
|
new ThreadPoolExecutor(2, 3, |
1325 |
|
LONG_DELAY_MS, MILLISECONDS, |
1326 |
|
new ArrayBlockingQueue<Runnable>(10)); |
1339 |
|
* if given a negative value |
1340 |
|
*/ |
1341 |
|
public void testMaximumPoolSizeIllegalArgumentException2() { |
1342 |
< |
ThreadPoolExecutor p = |
1342 |
> |
final ThreadPoolExecutor p = |
1343 |
|
new ThreadPoolExecutor(2, 3, |
1344 |
|
LONG_DELAY_MS, MILLISECONDS, |
1345 |
|
new ArrayBlockingQueue<Runnable>(10)); |
1358 |
|
* max pool size result in IllegalArgumentException. |
1359 |
|
*/ |
1360 |
|
public void testPoolSizeInvariants() { |
1361 |
< |
ThreadPoolExecutor p = |
1361 |
> |
final ThreadPoolExecutor p = |
1362 |
|
new ThreadPoolExecutor(1, 1, |
1363 |
|
LONG_DELAY_MS, MILLISECONDS, |
1364 |
|
new ArrayBlockingQueue<Runnable>(10)); |
1386 |
|
* when given a negative value |
1387 |
|
*/ |
1388 |
|
public void testKeepAliveTimeIllegalArgumentException() { |
1389 |
< |
ThreadPoolExecutor p = |
1389 |
> |
final ThreadPoolExecutor p = |
1390 |
|
new ThreadPoolExecutor(2, 3, |
1391 |
|
LONG_DELAY_MS, MILLISECONDS, |
1392 |
|
new ArrayBlockingQueue<Runnable>(10)); |