mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ACE-403: As an administrator I want to be able to defer the start of cron based jobs
- Added debug information for testing that jobs run after specified delay. - Improved comments, and added test run times to comments. - Added CronTriggerBeanSystemTest to test suite. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@63613 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -437,5 +437,6 @@ public class Repository01TestSuite extends TestSuite
|
|||||||
suite.addTest(new JUnit4TestAdapter(org.alfresco.util.test.junitrules.TemporaryNodesTest.class));
|
suite.addTest(new JUnit4TestAdapter(org.alfresco.util.test.junitrules.TemporaryNodesTest.class));
|
||||||
suite.addTest(new JUnit4TestAdapter(org.alfresco.util.test.junitrules.TemporarySitesTest.class));
|
suite.addTest(new JUnit4TestAdapter(org.alfresco.util.test.junitrules.TemporarySitesTest.class));
|
||||||
suite.addTest(new JUnit4TestAdapter(org.alfresco.util.CronTriggerBeanTest.class));
|
suite.addTest(new JUnit4TestAdapter(org.alfresco.util.CronTriggerBeanTest.class));
|
||||||
|
suite.addTest(new JUnit4TestAdapter(org.alfresco.util.CronTriggerBeanSystemTest.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -22,15 +22,17 @@ package org.alfresco.util;
|
|||||||
import static org.junit.Assert.assertFalse;
|
import static org.junit.Assert.assertFalse;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class tests that the CronTriggerBean correctly delays jobs when
|
* This class tests the CronTriggerBean within the full Alfresco context.
|
||||||
* specified.
|
* This test runs in about 45 seconds.
|
||||||
*
|
*
|
||||||
* @author Ahmed Owian
|
* @author Ahmed Owian
|
||||||
*/
|
*/
|
||||||
@@ -41,8 +43,7 @@ public class CronTriggerBeanSystemTest
|
|||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception
|
public void setUp() throws Exception
|
||||||
{
|
{
|
||||||
this.context = (ClassPathXmlApplicationContext) ApplicationContextHelper
|
this.context = (ClassPathXmlApplicationContext) ApplicationContextHelper.getApplicationContext();
|
||||||
.getApplicationContext();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -40,7 +40,9 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class tests that the CronTriggerBean correctly delays jobs when specified.
|
* This class tests that the CronTriggerBean correctly delays jobs when specified.
|
||||||
|
* This test runs in about 25 seconds.
|
||||||
|
*
|
||||||
* @author Ahmed Owian
|
* @author Ahmed Owian
|
||||||
*/
|
*/
|
||||||
public class CronTriggerBeanTest
|
public class CronTriggerBeanTest
|
||||||
|
Reference in New Issue
Block a user