|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
JSR166TestCase
ScheduledExecutorSubclassTest
public class ScheduledExecutorSubclassTest
| Nested Class Summary | |
|---|---|
class |
ScheduledExecutorSubclassTest.CustomExecutor
|
| Field Summary |
|---|
| Fields inherited from class JSR166TestCase |
|---|
eight, expensiveTests, five, four, LONG_DELAY_MS, m1, m10, m2, m3, m4, m5, m6, MEDIUM_DELAY_MS, nine, one, seven, SHORT_DELAY_MS, six, SIZE, SMALL_DELAY_MS, TEST_STRING, three, two, zero |
| Constructor Summary | |
|---|---|
ScheduledExecutorSubclassTest()
|
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
|
static junit.framework.Test |
suite()
|
void |
testExecute()
execute successfully executes a runnable |
void |
testExecuteNull()
execute(null) throws NPE |
void |
testFixedDelaySequence()
scheduleWithFixedDelay executes series of tasks with given period |
void |
testFixedRateSequence()
scheduleAtFixedRate executes series of tasks at given rate |
void |
testGetActiveCount()
getActiveCount increases but doesn't overestimate, when a thread becomes active |
void |
testGetCompletedTaskCount()
getCompletedTaskCount increases, but doesn't overestimate, when tasks complete |
void |
testGetCorePoolSize()
getCorePoolSize returns size given in constructor if not otherwise set |
void |
testGetLargestPoolSize()
getLargestPoolSize increases, but doesn't overestimate, when multiple threads active |
void |
testGetPoolSize()
getPoolSize increases, but doesn't overestimate, when threads become active |
void |
testGetQueue()
getQueue returns the work queue, which contains queued tasks |
void |
testGetTaskCount()
getTaskCount increases, but doesn't overestimate, when tasks submitted |
void |
testGetThreadFactory()
getThreadFactory returns factory in constructor if not set |
void |
testInvokeAll1()
invokeAll(null) throws NPE |
void |
testInvokeAll2()
invokeAll(empty collection) returns empty collection |
void |
testInvokeAll3()
invokeAll(c) throws NPE if c has null elements |
void |
testInvokeAll4()
get of invokeAll(c) throws exception on failed task |
void |
testInvokeAll5()
invokeAll(c) returns results of all completed tasks |
void |
testInvokeAny1()
invokeAny(null) throws NPE |
void |
testInvokeAny2()
invokeAny(empty collection) throws IAE |
void |
testInvokeAny3()
invokeAny(c) throws NPE if c has null elements |
void |
testInvokeAny4()
invokeAny(c) throws ExecutionException if no task completes |
void |
testInvokeAny5()
invokeAny(c) returns result of some task |
void |
testIsShutdown()
isShutdown is false before shutdown, true after |
void |
testIsTerminated()
isTerminated is false before termination, true after |
void |
testIsTerminating()
isTerminating is not true when running or when terminated |
void |
testPurge()
purge removes cancelled tasks from the queue |
void |
testRemove()
remove(task) removes queued task, and fails to remove active task |
void |
testSchedule1_RejectedExecutionException()
execute throws RejectedExecutionException if shutdown |
void |
testSchedule1()
delayed schedule of callable successfully executes after delay |
void |
testSchedule2_RejectedExecutionException()
schedule throws RejectedExecutionException if shutdown |
void |
testSchedule3_RejectedExecutionException()
schedule callable throws RejectedExecutionException if shutdown |
void |
testSchedule3()
delayed schedule of runnable successfully executes after delay |
void |
testSchedule4()
scheduleAtFixedRate executes runnable after given initial delay |
void |
testSchedule5()
scheduleWithFixedDelay executes runnable after given initial delay |
void |
testScheduleAtFixedRate1_RejectedExecutionException()
scheduleAtFixedRate throws RejectedExecutionException if shutdown |
void |
testScheduleNull()
schedule(null) throws NPE |
void |
testScheduleWithFixedDelay1_RejectedExecutionException()
scheduleWithFixedDelay throws RejectedExecutionException if shutdown |
void |
testSetThreadFactory()
setThreadFactory sets the thread factory returned by getThreadFactory |
void |
testSetThreadFactoryNull()
setThreadFactory(null) throws NPE |
void |
testShutdown1()
In default setting, shutdown cancels periodic but not delayed tasks at shutdown |
void |
testShutdown2()
If setExecuteExistingDelayedTasksAfterShutdownPolicy is false, delayed tasks are cancelled at shutdown |
void |
testShutdown3()
If setContinueExistingPeriodicTasksAfterShutdownPolicy is set false, periodic tasks are cancelled at shutdown |
void |
testShutdown4()
if setContinueExistingPeriodicTasksAfterShutdownPolicy is true, periodic tasks are not cancelled at shutdown |
void |
testShutdownNow()
shutdownNow returns a list containing tasks that were not run |
void |
testSubmitCallable()
completed submit of callable returns result |
void |
testSubmitRunnable()
completed submit of runnable returns successfully |
void |
testSubmitRunnable2()
completed submit of (runnable, result) returns result |
void |
testTimedInvokeAll1()
timed invokeAll(null) throws NPE |
void |
testTimedInvokeAll2()
timed invokeAll(empty collection) returns empty collection |
void |
testTimedInvokeAll3()
timed invokeAll(c) throws NPE if c has null elements |
void |
testTimedInvokeAll4()
get of element of invokeAll(c) throws exception on failed task |
void |
testTimedInvokeAll5()
timed invokeAll(c) returns results of all completed tasks |
void |
testTimedInvokeAll6()
timed invokeAll(c) cancels tasks not completed by timeout |
void |
testTimedInvokeAllNullTimeUnit()
timed invokeAll(,,null) throws NPE |
void |
testTimedInvokeAny1()
timed invokeAny(null) throws NPE |
void |
testTimedInvokeAny2()
timed invokeAny(empty collection) throws IAE |
void |
testTimedInvokeAny3()
timed invokeAny(c) throws NPE if c has null elements |
void |
testTimedInvokeAny4()
timed invokeAny(c) throws ExecutionException if no task completes |
void |
testTimedInvokeAny5()
timed invokeAny(c) returns result of some task |
void |
testTimedInvokeAnyNullTimeUnit()
timed invokeAny(,,null) throws NPE |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, setName, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ScheduledExecutorSubclassTest()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
public static junit.framework.Test suite()
public void testExecute()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testSchedule1()
throws java.lang.Exception
java.lang.Exception
public void testSchedule3()
throws java.lang.Exception
java.lang.Exception
public void testSchedule4()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testSchedule5()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testFixedRateSequence()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testFixedDelaySequence()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testExecuteNull()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testScheduleNull()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testSchedule1_RejectedExecutionException()
public void testSchedule2_RejectedExecutionException()
public void testSchedule3_RejectedExecutionException()
public void testScheduleAtFixedRate1_RejectedExecutionException()
public void testScheduleWithFixedDelay1_RejectedExecutionException()
public void testGetActiveCount()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testGetCompletedTaskCount()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testGetCorePoolSize()
public void testGetLargestPoolSize()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testGetPoolSize()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testGetTaskCount()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testGetThreadFactory()
public void testSetThreadFactory()
public void testSetThreadFactoryNull()
public void testIsShutdown()
public void testIsTerminated()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testIsTerminating()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testGetQueue()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testRemove()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testPurge()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void testShutdownNow()
public void testShutdown1()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testShutdown2()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testShutdown3()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testShutdown4()
throws java.lang.InterruptedException
java.lang.InterruptedException
public void testSubmitCallable()
throws java.lang.Exception
java.lang.Exception
public void testSubmitRunnable()
throws java.lang.Exception
java.lang.Exception
public void testSubmitRunnable2()
throws java.lang.Exception
java.lang.Exception
public void testInvokeAny1()
throws java.lang.Exception
java.lang.Exception
public void testInvokeAny2()
throws java.lang.Exception
java.lang.Exception
public void testInvokeAny3()
throws java.lang.Exception
java.lang.Exception
public void testInvokeAny4()
throws java.lang.Exception
java.lang.Exception
public void testInvokeAny5()
throws java.lang.Exception
java.lang.Exception
public void testInvokeAll1()
throws java.lang.Exception
java.lang.Exception
public void testInvokeAll2()
throws java.lang.Exception
java.lang.Exception
public void testInvokeAll3()
throws java.lang.Exception
java.lang.Exception
public void testInvokeAll4()
throws java.lang.Exception
java.lang.Exception
public void testInvokeAll5()
throws java.lang.Exception
java.lang.Exception
public void testTimedInvokeAny1()
throws java.lang.Exception
java.lang.Exception
public void testTimedInvokeAnyNullTimeUnit()
throws java.lang.Exception
java.lang.Exception
public void testTimedInvokeAny2()
throws java.lang.Exception
java.lang.Exception
public void testTimedInvokeAny3()
throws java.lang.Exception
java.lang.Exception
public void testTimedInvokeAny4()
throws java.lang.Exception
java.lang.Exception
public void testTimedInvokeAny5()
throws java.lang.Exception
java.lang.Exception
public void testTimedInvokeAll1()
throws java.lang.Exception
java.lang.Exception
public void testTimedInvokeAllNullTimeUnit()
throws java.lang.Exception
java.lang.Exception
public void testTimedInvokeAll2()
throws java.lang.Exception
java.lang.Exception
public void testTimedInvokeAll3()
throws java.lang.Exception
java.lang.Exception
public void testTimedInvokeAll4()
throws java.lang.Exception
java.lang.Exception
public void testTimedInvokeAll5()
throws java.lang.Exception
java.lang.Exception
public void testTimedInvokeAll6()
throws java.lang.Exception
java.lang.Exception
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||