org.opencms.scheduler
Class TestCmsScheduler

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.opencms.scheduler.TestCmsScheduler
All Implemented Interfaces:
junit.framework.Test

public class TestCmsScheduler
extends junit.framework.TestCase

Test cases for the OpenCms scheduler thread pool.

Since:
6.0.0

Field Summary
static int SECONDS_TO_WAIT
          Number of seconds to wait.
static int THREADS_TO_RUN
          Number of threads to run.
 
Constructor Summary
TestCmsScheduler(String arg0)
          Default JUnit constructor.
 
Method Summary
 void testActivateAndDeactivateJob()
          Tests activating and deactivating of scheduled jobs.
 void testAddAndRemoveJobFromScheduler()
          Tests adding and removing a job to the OpenCms schedule manager.
 void testAddExistingJobAgainToScheduler()
          Tests adding an existing job again to the OpenCms scheduler.
 void testBasicJobExecution()
          Tests execution of jobs using CmsSchedulerThreadPool.
 void testCmsJobLaunch()
          Tests launching of an OpenCms job.
 void testJobInOpenCmsScheduler()
          Tests launching of an OpenCms job with the OpenCms schedule manager.
 void testPersitentJobInOpenCmsScheduler()
          Tests launching of a persistent OpenCms job with the OpenCms schedule manager.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SECONDS_TO_WAIT

public static final int SECONDS_TO_WAIT
Number of seconds to wait.

See Also:
Constant Field Values

THREADS_TO_RUN

public static final int THREADS_TO_RUN
Number of threads to run.

See Also:
Constant Field Values
Constructor Detail

TestCmsScheduler

public TestCmsScheduler(String arg0)
Default JUnit constructor.

Parameters:
arg0 - JUnit parameters
Method Detail

testActivateAndDeactivateJob

public void testActivateAndDeactivateJob()
                                  throws Exception
Tests activating and deactivating of scheduled jobs.

Throws:
Exception - if something goes wrong

testAddAndRemoveJobFromScheduler

public void testAddAndRemoveJobFromScheduler()
                                      throws Exception
Tests adding and removing a job to the OpenCms schedule manager.

Throws:
Exception - if something goes wrong

testAddExistingJobAgainToScheduler

public void testAddExistingJobAgainToScheduler()
                                        throws Exception
Tests adding an existing job again to the OpenCms scheduler.

Throws:
Exception - if something goes wrong

testBasicJobExecution

public void testBasicJobExecution()
                           throws Exception
Tests execution of jobs using CmsSchedulerThreadPool.

Throws:
Exception - if something goes wrong

testCmsJobLaunch

public void testCmsJobLaunch()
                      throws Exception
Tests launching of an OpenCms job.

Throws:
Exception - if something goes wrong

testJobInOpenCmsScheduler

public void testJobInOpenCmsScheduler()
                               throws Exception
Tests launching of an OpenCms job with the OpenCms schedule manager.

Throws:
Exception - if something goes wrong

testPersitentJobInOpenCmsScheduler

public void testPersitentJobInOpenCmsScheduler()
                                        throws Exception
Tests launching of a persistent OpenCms job with the OpenCms schedule manager.

Throws:
Exception - if something goes wrong