54 |
|
} |
55 |
|
|
56 |
|
/** |
57 |
< |
* delayed schedule of runnable successfully executes after delay |
57 |
> |
* delayed schedule of runnable successfully executes after delay |
58 |
|
*/ |
59 |
|
public void testSchedule3() throws InterruptedException { |
60 |
|
TrackedShortRunnable runnable = new TrackedShortRunnable(); |
137 |
|
|
138 |
|
|
139 |
|
/** |
140 |
< |
* execute(null) throws NPE |
140 |
> |
* execute(null) throws NPE |
141 |
|
*/ |
142 |
|
public void testExecuteNull() throws InterruptedException { |
143 |
|
ScheduledThreadPoolExecutor se = null; |
213 |
|
} |
214 |
|
|
215 |
|
/** |
216 |
< |
* scheduleAtFixedRate throws RejectedExecutionException if shutdown |
216 |
> |
* scheduleAtFixedRate throws RejectedExecutionException if shutdown |
217 |
|
*/ |
218 |
|
public void testScheduleAtFixedRate1_RejectedExecutionException() throws InterruptedException { |
219 |
|
ScheduledThreadPoolExecutor se = new ScheduledThreadPoolExecutor(1); |
245 |
|
} |
246 |
|
|
247 |
|
/** |
248 |
< |
* getActiveCount increases but doesn't overestimate, when a |
249 |
< |
* thread becomes active |
248 |
> |
* getActiveCount increases but doesn't overestimate, when a |
249 |
> |
* thread becomes active |
250 |
|
*/ |
251 |
|
public void testGetActiveCount() throws InterruptedException { |
252 |
|
ScheduledThreadPoolExecutor p2 = new ScheduledThreadPoolExecutor(2); |
258 |
|
} |
259 |
|
|
260 |
|
/** |
261 |
< |
* getCompletedTaskCount increases, but doesn't overestimate, |
262 |
< |
* when tasks complete |
261 |
> |
* getCompletedTaskCount increases, but doesn't overestimate, |
262 |
> |
* when tasks complete |
263 |
|
*/ |
264 |
|
public void testGetCompletedTaskCount() throws InterruptedException { |
265 |
|
ScheduledThreadPoolExecutor p2 = new ScheduledThreadPoolExecutor(2); |
271 |
|
} |
272 |
|
|
273 |
|
/** |
274 |
< |
* getCorePoolSize returns size given in constructor if not otherwise set |
274 |
> |
* getCorePoolSize returns size given in constructor if not otherwise set |
275 |
|
*/ |
276 |
|
public void testGetCorePoolSize() throws InterruptedException { |
277 |
|
ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1); |
280 |
|
} |
281 |
|
|
282 |
|
/** |
283 |
< |
* getLargestPoolSize increases, but doesn't overestimate, when |
284 |
< |
* multiple threads active |
283 |
> |
* getLargestPoolSize increases, but doesn't overestimate, when |
284 |
> |
* multiple threads active |
285 |
|
*/ |
286 |
|
public void testGetLargestPoolSize() throws InterruptedException { |
287 |
|
ScheduledThreadPoolExecutor p2 = new ScheduledThreadPoolExecutor(2); |
294 |
|
} |
295 |
|
|
296 |
|
/** |
297 |
< |
* getPoolSize increases, but doesn't overestimate, when threads |
298 |
< |
* become active |
297 |
> |
* getPoolSize increases, but doesn't overestimate, when threads |
298 |
> |
* become active |
299 |
|
*/ |
300 |
|
public void testGetPoolSize() throws InterruptedException { |
301 |
|
ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1); |
306 |
|
} |
307 |
|
|
308 |
|
/** |
309 |
< |
* getTaskCount increases, but doesn't overestimate, when tasks |
310 |
< |
* submitted |
309 |
> |
* getTaskCount increases, but doesn't overestimate, when tasks |
310 |
> |
* submitted |
311 |
|
*/ |
312 |
|
public void testGetTaskCount() throws InterruptedException { |
313 |
|
ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1); |
355 |
|
} |
356 |
|
|
357 |
|
/** |
358 |
< |
* is isShutDown is false before shutdown, true after |
358 |
> |
* isShutDown is false before shutdown, true after |
359 |
|
*/ |
360 |
|
public void testIsShutdown() { |
361 |
|
|
371 |
|
|
372 |
|
|
373 |
|
/** |
374 |
< |
* isTerminated is false before termination, true after |
374 |
> |
* isTerminated is false before termination, true after |
375 |
|
*/ |
376 |
|
public void testIsTerminated() throws InterruptedException { |
377 |
|
ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1); |
385 |
|
} |
386 |
|
|
387 |
|
/** |
388 |
< |
* isTerminating is not true when running or when terminated |
388 |
> |
* isTerminating is not true when running or when terminated |
389 |
|
*/ |
390 |
|
public void testIsTerminating() throws InterruptedException { |
391 |
|
ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1); |
448 |
|
} |
449 |
|
|
450 |
|
/** |
451 |
< |
* purge removes cancelled tasks from the queue |
451 |
> |
* purge removes cancelled tasks from the queue |
452 |
|
*/ |
453 |
|
public void testPurge() throws InterruptedException { |
454 |
|
ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1); |
477 |
|
} |
478 |
|
|
479 |
|
/** |
480 |
< |
* shutDownNow returns a list containing tasks that were not run |
480 |
> |
* shutDownNow returns a list containing tasks that were not run |
481 |
|
*/ |
482 |
|
public void testShutDownNow() throws InterruptedException { |
483 |
|
ScheduledThreadPoolExecutor p1 = new ScheduledThreadPoolExecutor(1); |