From bc991a45bc4c522a2db82fe31dfc8bbe6c7016f3 Mon Sep 17 00:00:00 2001 From: Dave Ward Date: Fri, 12 Jun 2009 12:08:01 +0000 Subject: [PATCH] Fix intermittent failures of SiteActivityTest. Shut down scheduler in setup() method so that we aren't competing with the scheduled post lookup and feed generator jobs. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14684 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../java/org/alfresco/repo/activities/SiteActivityTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/java/org/alfresco/repo/activities/SiteActivityTest.java b/source/java/org/alfresco/repo/activities/SiteActivityTest.java index 7879b35593..2dcc056952 100644 --- a/source/java/org/alfresco/repo/activities/SiteActivityTest.java +++ b/source/java/org/alfresco/repo/activities/SiteActivityTest.java @@ -46,6 +46,7 @@ import org.alfresco.util.ApplicationContextHelper; import org.alfresco.util.PropertyMap; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.quartz.Scheduler; import org.springframework.context.ApplicationContext; /** @@ -106,6 +107,11 @@ public class SiteActivityTest extends TestCase super.setUp(); String testid = ""+System.currentTimeMillis(); + // Let's shut down the scheduler so that we aren't competing with the scheduled versions of the post lookup and + // feed generator jobs + Scheduler scheduler = (Scheduler) applicationContext.getBean("schedulerFactory"); + scheduler.shutdown(); + // Get the required services this.activityService = (ActivityService)applicationContext.getBean("activityService"); this.siteService = (SiteService)applicationContext.getBean("SiteService");