Package org.openbravo.scheduling.trigger
Class MisfirePolicyTest
- java.lang.Object
-
- org.openbravo.test.base.OBBaseTest
-
- org.openbravo.scheduling.trigger.MisfirePolicyTest
-
public class MisfirePolicyTest extends OBBaseTest
Test cases to cover the expected behavior of the misfire policy applied to the background processes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MisfirePolicyTest.EmptyProcess
Empty process used to determine whether jobs are executed by the scheduler
-
Field Summary
-
Fields inherited from class org.openbravo.test.base.OBBaseTest
DOLLAR, DOLLAR_ID, EURO, EURO_ID, QA_TEST_ADMIN_USER_ID, QA_TEST_CLIENT_ID, QA_TEST_ORG_ID, TEST_BP_CATEGORY_ID, TEST_CLIENT_ID, TEST_LOCATION_ID, TEST_ORDER_ID, TEST_ORG_ID, TEST_ORG_TREE, TEST_PRODUCT_ID, TEST_ROLE_ID, TEST_US_ORG_ID, TEST_USER_ID, TEST_WAREHOUSE_ID, TEST2_USER_ID, userIds, watchFailures
-
-
Constructor Summary
Constructors Constructor Description MisfirePolicyTest(String configOption)
Constructor that will set the necessary config for clustered or non-clustered execution
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkMisfirePolicy()
Check that the misfire policy is fulfilled: don't execute on misfire and wait for next regular execution time.void
checkMisfirePolicyWithSecondlySchedule()
static List<String>
configOptions()
void
everyNDaysNotExecutedOnMisfire()
Check that jobs are not executed on misfire in the "every n days" daily execution.void
startScheduler()
void
stopScheduler()
-
Methods inherited from class org.openbravo.test.base.OBBaseTest
addReadWriteAccess, classSetUp, commitTransaction, count, getConnectionProvider, getOneInstance, getRandomUser, getTestLogAppender, initializeDalLayer, initializeDisabledTestCases, initializeTestLogAppender, isErrorOccured, reportException, rollback, setLogStackTraces, setQAAdminContext, setSystemAdministratorContext, setTestAdminContext, setTestLogAppenderLevel, setTestUserContext, setUp, setUserContext, shouldMockServletContext, staticInitializeDalLayer, testDone
-
-
-
-
Constructor Detail
-
MisfirePolicyTest
public MisfirePolicyTest(String configOption)
Constructor that will set the necessary config for clustered or non-clustered execution- Parameters:
configOption
- clustered or non-clustered
-
-
Method Detail
-
startScheduler
public void startScheduler() throws org.quartz.SchedulerException
- Throws:
org.quartz.SchedulerException
-
stopScheduler
public void stopScheduler() throws org.quartz.SchedulerException
- Throws:
org.quartz.SchedulerException
-
checkMisfirePolicy
public void checkMisfirePolicy() throws org.quartz.SchedulerException, InterruptedException
Check that the misfire policy is fulfilled: don't execute on misfire and wait for next regular execution time.- Throws:
org.quartz.SchedulerException
InterruptedException
-
checkMisfirePolicyWithSecondlySchedule
public void checkMisfirePolicyWithSecondlySchedule() throws InterruptedException, org.quartz.SchedulerException
- Throws:
InterruptedException
org.quartz.SchedulerException
-
everyNDaysNotExecutedOnMisfire
public void everyNDaysNotExecutedOnMisfire() throws org.quartz.SchedulerException, InterruptedException
Check that jobs are not executed on misfire in the "every n days" daily execution. We are explicitly testing this kind of schedule because of its particular implementation.- Throws:
org.quartz.SchedulerException
InterruptedException
-
-