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
This commit is contained in:
Dave Ward
2009-06-12 12:08:01 +00:00
parent 6c562fe9ea
commit bc991a45bc

View File

@@ -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");