Return-Path: Delivered-To: apmail-ode-commits-archive@www.apache.org Received: (qmail 75943 invoked from network); 8 Jun 2009 01:19:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Jun 2009 01:19:43 -0000 Received: (qmail 20511 invoked by uid 500); 8 Jun 2009 01:19:55 -0000 Delivered-To: apmail-ode-commits-archive@ode.apache.org Received: (qmail 20468 invoked by uid 500); 8 Jun 2009 01:19:55 -0000 Mailing-List: contact commits-help@ode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ode.apache.org Delivered-To: mailing list commits@ode.apache.org Received: (qmail 20459 invoked by uid 99); 8 Jun 2009 01:19:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jun 2009 01:19:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jun 2009 01:19:53 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7A18223888CC; Mon, 8 Jun 2009 01:19:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r782489 - /ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/SystemCronCleanupTest.java Date: Mon, 08 Jun 2009 01:19:33 -0000 To: commits@ode.apache.org From: seanahn@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090608011933.7A18223888CC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: seanahn Date: Mon Jun 8 01:19:32 2009 New Revision: 782489 URL: http://svn.apache.org/viewvc?rev=782489&view=rev Log: Custom cron schedule config moved to beginClass and afterClass Modified: ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/SystemCronCleanupTest.java Modified: ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/SystemCronCleanupTest.java URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/SystemCronCleanupTest.java?rev=782489&r1=782488&r2=782489&view=diff ============================================================================== --- ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/SystemCronCleanupTest.java (original) +++ ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/instancecleanup/SystemCronCleanupTest.java Mon Jun 8 01:19:32 2009 @@ -5,14 +5,11 @@ 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 { - static { - String customSchedulesFilePath = SystemCronCleanupTest.class.getClassLoader().getResource("webapp").getFile() + "/WEB-INF/test-schedules.xml"; - System.setProperty(SystemSchedulesConfig.SCHEDULE_CONFIG_FILE_PROP_KEY, customSchedulesFilePath); - } - @Test(dataProvider="configs") public void testCleanAll() throws Exception { go("TestSystemCronCleanup", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -23,6 +20,17 @@ go("TestSystemCronCleanup_exclude", 1, 0, 0, 0, 3, 0, 6, 2, 3, 6, 59, 76); } + @BeforeClass + protected void customizeScheduleConfigFile() { + String customSchedulesFilePath = SystemCronCleanupTest.class.getClassLoader().getResource("webapp").getFile() + "/WEB-INF/test-schedules.xml"; + System.setProperty(SystemSchedulesConfig.SCHEDULE_CONFIG_FILE_PROP_KEY, customSchedulesFilePath); + } + + @AfterClass + protected void resetScheduleConfigFile() { + 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);