240 |
|
/** |
241 |
|
* schedule callable throws RejectedExecutionException if shutdown |
242 |
|
*/ |
243 |
< |
public void testSchedule3_RejectedExecutionException() throws InterruptedException { |
244 |
< |
ScheduledThreadPoolExecutor se = new ScheduledThreadPoolExecutor(1); |
245 |
< |
try { |
243 |
> |
public void testSchedule3_RejectedExecutionException() throws InterruptedException { |
244 |
> |
ScheduledThreadPoolExecutor se = new ScheduledThreadPoolExecutor(1); |
245 |
> |
try { |
246 |
|
se.shutdown(); |
247 |
|
se.schedule(new NoOpCallable(), |
248 |
|
MEDIUM_DELAY_MS, MILLISECONDS); |
250 |
|
} catch (RejectedExecutionException success) { |
251 |
|
} catch (SecurityException ok) { |
252 |
|
} |
253 |
< |
joinPool(se); |
253 |
> |
joinPool(se); |
254 |
|
} |
255 |
|
|
256 |
|
/** |