[jbpm-commits] JBoss JBPM SVN: r6018 - in jbpm4/trunk/modules: test-db/src/test/java/org/jbpm/test/history and 1 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Dec 22 08:32:21 EST 2009
Author: jbarrez
Date: 2009-12-22 08:32:20 -0500 (Tue, 22 Dec 2009)
New Revision: 6018
Modified:
jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custombusinesscalendarcfg/CustomBusinessCalendarCfgTest.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/history/AvgDurationTest.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/query/HistoryTaskQueryTest.java
Log:
Fixing Hudson: Clock.setCurrentTime(null) has to be called in a tearDown() of a test when using the Clock.setCurrentTime(some date) method
Modified: jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custombusinesscalendarcfg/CustomBusinessCalendarCfgTest.java
===================================================================
--- jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custombusinesscalendarcfg/CustomBusinessCalendarCfgTest.java 2009-12-22 13:00:18 UTC (rev 6017)
+++ jbpm4/trunk/modules/test-cfg/src/test/java/org/jbpm/test/custombusinesscalendarcfg/CustomBusinessCalendarCfgTest.java 2009-12-22 13:32:20 UTC (rev 6018)
@@ -35,6 +35,12 @@
* @author Tom Baeyens
*/
public class CustomBusinessCalendarCfgTest extends JbpmCustomCfgTestCase {
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ Clock.setCurrentTime(null);
+ }
public void testCustomBusinessCalendarCfg() {
deployJpdlXmlString(
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/history/AvgDurationTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/history/AvgDurationTest.java 2009-12-22 13:00:18 UTC (rev 6017)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/history/AvgDurationTest.java 2009-12-22 13:32:20 UTC (rev 6018)
@@ -24,6 +24,8 @@
import java.util.Map;
import org.jbpm.api.Execution;
+import org.jbpm.api.ProcessDefinition;
+import org.jbpm.pvm.internal.util.Clock;
import org.jbpm.test.JbpmTestCase;
@@ -33,7 +35,7 @@
public class AvgDurationTest extends JbpmTestCase {
public void testAvgDuration() throws Exception {
- deployJpdlXmlString(
+ String deploymentId = deployJpdlXmlString(
"<process name='Insurance claim' key='ICL'>" +
" <start>" +
" <transition to='one' />" +
@@ -55,7 +57,8 @@
executeProcess();
executeProcess();
- Map<String, Long> avgDurations = historyService.avgDurationPerActivity("ICL-1");
+ ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().uniqueResult();
+ Map<String, Long> avgDurations = historyService.avgDurationPerActivity(processDefinition.getId());
Long avgDurationOne = avgDurations.get("one");
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/query/HistoryTaskQueryTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/query/HistoryTaskQueryTest.java 2009-12-22 13:00:18 UTC (rev 6017)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/query/HistoryTaskQueryTest.java 2009-12-22 13:32:20 UTC (rev 6018)
@@ -44,6 +44,12 @@
*/
public class HistoryTaskQueryTest extends JbpmTestCase {
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ Clock.setCurrentTime(null);
+ }
+
public void testOrderByName() {
testOrderBy(HistoryTaskQuery.PROPERTY_ASSIGNEE, Arrays.asList("Alex", "Joram", "Tom"));
}
More information about the jbpm-commits
mailing list