[
http://jira.jboss.com/jira/browse/JBPM-1137?page=comments#action_12402549 ]
Rajesh Rajasekaran commented on JBPM-1137:
------------------------------------------
Alejandro
Just wanted to confirm a few things.
Running test.jpdl runs these 905 tests. Is that all?
[junit] Running org.jbpm.AllTests
[junit] Tests run: 905, Failures: 0, Errors: 0, Time elapsed: 88.214 sec
Also we test patches by building from the release branch and then replace with the
attached patch jar, we do not use the patch branch (jpdl_3_2_2_JBPM-1137) directly.
The test target kept rebuilding the jpdl jar replacing the patched one that i copied,
hence i had to disable the build part in the build files.
For patch testing, we do not cover multiple databases (this is covered as part of SOA
platform testing), unless the patch directly affects database.
Can you tell me if there is any way or testcase to test this leap year date calculations?
Leap Year Date Calculations (v3.2.2)
------------------------------------
Key: JBPM-1137
URL:
http://jira.jboss.com/jira/browse/JBPM-1137
Project: JBoss jBPM
Issue Type: Support Patch
Components: Core Engine
Affects Versions: jBPM jPDL 3.2.2
Reporter: Alejandro Guizar
Assigned To: Rajesh Rajasekaran
Attachments: jbpm-jpdl.jar
Based on JBPM-1098 there is concern over date calculations in in jBPM 3.1 and 3.2. There
might be issues around the end of Feb. The problem is characterized as follows. Under the
current model, durations that are not expressed in months or years work correctly.
Consider the following expression.
endDate = new Date(startDate.getTime() + interval);
If startDate is February 28, 2008 and interval is 1 day, then endDate will be February
29, 2008. Every day has the same duration even on leap years. The presentation layer is
responsible of converting the milliseconds in a Date to a suitable representation in the
calendar system. The Java APIs are all aware of leap years, so this is covered as well.
The situation is different for months and years. If the interval above was 1 year, then
endDate would be February 27, 2009. Because of the extra day in 2008, the expected endDate
has shifted backwards one day. To fix this, the Duration class has to preserve the
original unit of time instead of converting to milliseconds up front. Calculation of
endDate can then be delegated to java.util.Calendar as follows.
startCalendar = Calendar.getInstance();
startCalendar.setTime(startDate);
startCalendar.add(unit, interval);
endDate = startCalendar.getTime();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira