From a9923dccfaa1758d7d50c641afdbd30abad16148 Mon Sep 17 00:00:00 2001 From: Ahmed Owian Date: Tue, 4 Mar 2014 17:23:54 +0000 Subject: [PATCH] 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 --- .../test-java/org/alfresco/Repository01TestSuite.java | 1 + .../org/alfresco/util/CronTriggerBeanSystemTest.java | 11 ++++++----- .../org/alfresco/util/CronTriggerBeanTest.java | 4 +++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/source/test-java/org/alfresco/Repository01TestSuite.java b/source/test-java/org/alfresco/Repository01TestSuite.java index 837eb2c951..5168f59f6d 100644 --- a/source/test-java/org/alfresco/Repository01TestSuite.java +++ b/source/test-java/org/alfresco/Repository01TestSuite.java @@ -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.TemporarySitesTest.class)); suite.addTest(new JUnit4TestAdapter(org.alfresco.util.CronTriggerBeanTest.class)); + suite.addTest(new JUnit4TestAdapter(org.alfresco.util.CronTriggerBeanSystemTest.class)); } } diff --git a/source/test-java/org/alfresco/util/CronTriggerBeanSystemTest.java b/source/test-java/org/alfresco/util/CronTriggerBeanSystemTest.java index 760b62f484..16aa2a95c2 100644 --- a/source/test-java/org/alfresco/util/CronTriggerBeanSystemTest.java +++ b/source/test-java/org/alfresco/util/CronTriggerBeanSystemTest.java @@ -22,15 +22,17 @@ package org.alfresco.util; import static org.junit.Assert.assertFalse; 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.Test; import org.springframework.context.support.ClassPathXmlApplicationContext; /** - * This class tests that the CronTriggerBean correctly delays jobs when - * specified. + * This class tests the CronTriggerBean within the full Alfresco context. + * This test runs in about 45 seconds. * * @author Ahmed Owian */ @@ -41,8 +43,7 @@ public class CronTriggerBeanSystemTest @Before public void setUp() throws Exception { - this.context = (ClassPathXmlApplicationContext) ApplicationContextHelper - .getApplicationContext(); + this.context = (ClassPathXmlApplicationContext) ApplicationContextHelper.getApplicationContext(); } /** diff --git a/source/test-java/org/alfresco/util/CronTriggerBeanTest.java b/source/test-java/org/alfresco/util/CronTriggerBeanTest.java index dc74088da9..a2263d147f 100644 --- a/source/test-java/org/alfresco/util/CronTriggerBeanTest.java +++ b/source/test-java/org/alfresco/util/CronTriggerBeanTest.java @@ -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 */ public class CronTriggerBeanTest