ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sean...@apache.org
Subject svn commit: r783884 - /ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/SystemCronCleanupTest.java
Date Thu, 11 Jun 2009 20:00:37 GMT
Author: seanahn
Date: Thu Jun 11 20:00:37 2009
New Revision: 783884

URL: http://svn.apache.org/viewvc?rev=783884&view=rev
Log:
Disable system cron for all other tests, to make them faster

Modified:
    ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/SystemCronCleanupTest.java

Modified: ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/SystemCronCleanupTest.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/SystemCronCleanupTest.java?rev=783884&r1=783883&r2=783884&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/SystemCronCleanupTest.java
(original)
+++ ode/branches/APACHE_ODE_1.X/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/SystemCronCleanupTest.java
Thu Jun 11 20:00:37 2009
@@ -5,6 +5,8 @@
 import org.apache.ode.bpel.dao.ProcessInstanceDAO;
 import org.apache.ode.bpel.engine.cron.SystemSchedulesConfig;
 import org.hibernate.Query;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 public class SystemCronCleanupTest extends CleanTestBase {
@@ -23,6 +25,17 @@
         go("TestSystemCronCleanup_exclude", 1, 0, 0, 0, 3, 0, 6, 2, 3, 6, 59, 76);
     }
 
+    @BeforeClass
+    public void setCustomCronSchedules() {
+        String customSchedulesFilePath = SystemCronCleanupTest.class.getClassLoader().getResource("webapp").getFile()
+ "/WEB-INF/test-schedules.xml";
+        System.setProperty(SystemSchedulesConfig.SCHEDULE_CONFIG_FILE_PROP_KEY, customSchedulesFilePath);
+    }
+    
+    @AfterClass
+    public void resetCustomCronSchedules() {
+        System.getProperties().remove(SystemSchedulesConfig.SCHEDULE_CONFIG_FILE_PROP_KEY);
+    }
+    
     protected void go(String bundleName, int instances, int activityRecoveries, int correlationSets,
int faults, int exchanges, int routes, int messsages, int partnerLinks, int scopes, int variables,
int events, int largeData) throws Exception {
         if (server.isDeployed(bundleName)) server.undeployProcess(bundleName);
         server.deployProcess(bundleName);



Mime
View raw message