Tests run: 25, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.058 s <<< FAILURE! - in org.camunda.bpm.dmn.engine.type.DmnDataTypeTransformerTest
shouldTransformZonedDateTime(org.camunda.bpm.dmn.engine.type.DmnDataTypeTransformerTest) Time elapsed: 0.007 s <<< FAILURE!
java.lang.AssertionError:
Expected: is <Value 'Fri Sep 18 12:00:00 EDT 2015' of type 'PrimitiveValueType[date]', isTransient=false>
but: was <Value 'Fri Sep 18 06:00:00 EDT 2015' of type 'PrimitiveValueType[date]', isTransient=false>
at org.camunda.bpm.dmn.engine.type.DmnDataTypeTransformerTest.shouldTransformZonedDateTime(DmnDataTypeTransformerTest.java:248)
I did a build of camunda-bpm-platform master last Saturday, and it was error free.
Which environment you’re using?
Operating-System ?
JDK-Version ?
Database system?
This test seems to be incorrect when used in timezone different than Europe/Berlin.
A date without timezone information is compared to a timestamp including a timezone.
This leads to the 6 hour difference between expected value and determined value.
@Test
public void shouldTransformZonedDateTime() {
// given
DmnDataTypeTransformer typeTransformer = registry.getTransformer("date");
Date date = toDate("2015-09-18T12:00:00");
TypedValue dateValue = Variables.dateValue(date);
ZonedDateTime zonedDateTime = ZonedDateTime.of(2015, 9, 18, 12, 0, 0, 0, ZoneId.of("Europe/Berlin"));
// when
TypedValue transformedFromZonedDateTime = typeTransformer.transform(zonedDateTime);
// then
assertThat(transformedFromZonedDateTime, is(dateValue));
}
@langfr Please note that this is not the only error, there are more:
ERROR] Failures:
[ERROR] HistoryCleanupSchedulerActivityInstancesTest.shouldScheduleToLater:137
Expected: is <Sat Mar 23 08:00:10 EDT 2013>
but: was <Sat Mar 23 13:00:00 EDT 2013>
[ERROR] HistoryCleanupSchedulerAttachmentsTest.shouldScheduleToLater:155
Expected: is <Sat Mar 23 08:00:10 EDT 2013>
but: was <Sat Mar 23 13:00:00 EDT 2013>
[ERROR] org.camunda.bpm.engine.test.api.history.removaltime.cleanup.HistoryCleanupSchedulerAuthorizationsTest.shouldScheduleToLater(org.camunda.bpm.engine.test.api.history.removaltime.cleanup.HistoryCleanupSchedulerAuthorizationsTest)
[ERROR] Run 1: HistoryCleanupSchedulerAuthorizationsTest.shouldScheduleToLater:160
Expected: is <Sat Mar 23 08:00:10 EDT 2013>
but: was <Sat Mar 23 13:00:00 EDT 2013>
[ERROR] Run 2: HistoryCleanupSchedulerAuthorizationsTest.shouldScheduleToLater Database is not clean:
Table: ACT_RU_AUTHORIZATION contains: 5 rows
[INFO]
[ERROR] HistoryCleanupSchedulerBatchesTest.shouldScheduleToLater:180
Expected: is <Sat Mar 23 08:00:10 EDT 2013>
but: was <Sat Mar 23 13:00:00 EDT 2013>
[ERROR] HistoryCleanupSchedulerCommentsTest.shouldScheduleToLater:153
Expected: is <Sat Mar 23 08:00:10 EDT 2013>
but: was <Sat Mar 23 13:00:00 EDT 2013>
[ERROR] HistoryCleanupSchedulerDecisionsTest.shouldScheduleToLaterByDecisionInputs:148
Expected: is <Sat Mar 23 08:00:10 EDT 2013>
but: was <Sat Mar 23 13:00:00 EDT 2013>
[ERROR] HistoryCleanupSchedulerDecisionsTest.shouldScheduleToLaterByDecisionOutputs:208
Expected: is <Sat Mar 23 08:00:10 EDT 2013>
but: was <Sat Mar 23 13:00:00 EDT 2013>
[ERROR] HistoryCleanupSchedulerDetailsTest.shouldScheduleToLater:148
Expected: is <Sat Mar 23 08:00:10 EDT 2013>
but: was <Sat Mar 23 13:00:00 EDT 2013>
[ERROR] HistoryCleanupSchedulerExternalTaskLogsTest.shouldScheduleToLater:163
Expected: is <Sat Mar 23 08:00:10 EDT 2013>
but: was <Sat Mar 23 13:00:00 EDT 2013>
[ERROR] HistoryCleanupSchedulerIdentityLinkLogsTest.shouldScheduleToLater:144
Expected: is <Sat Mar 23 08:00:10 EDT 2013>
but: was <Sat Mar 23 13:00:00 EDT 2013>
[ERROR] HistoryCleanupSchedulerIncidentsTest.shouldScheduleToLater:172
Expected: is <Sat Mar 23 08:00:10 EDT 2013>
but: was <Sat Mar 23 13:00:00 EDT 2013>
[ERROR] HistoryCleanupSchedulerJobLogTest.shouldScheduleToLater:168
Expected: is <Sat Mar 23 08:00:10 EDT 2013>
but: was <Sat Mar 23 13:00:00 EDT 2013>
[ERROR] HistoryCleanupSchedulerProcessInstancesTest.shouldScheduleToLater:142
Expected: is <Sat Mar 23 08:00:10 EDT 2013>
but: was <Sat Mar 23 13:00:00 EDT 2013>
[ERROR] HistoryCleanupSchedulerTaskInstancesTest.shouldScheduleToLater:147
Expected: is <Sat Mar 23 08:00:10 EDT 2013>
but: was <Sat Mar 23 13:00:00 EDT 2013>
[ERROR] HistoryCleanupSchedulerUserOperationLogsTest.shouldScheduleToLater:156
Expected: is <Sat Mar 23 08:00:10 EDT 2013>
but: was <Sat Mar 23 13:00:00 EDT 2013>
[ERROR] HistoryCleanupSchedulerVariableInstancesTest.shouldScheduleToLater:146
Expected: is <Sat Mar 23 08:00:10 EDT 2013>
but: was <Sat Mar 23 13:00:00 EDT 2013>
[ERROR] CompetingHistoryCleanupAcquisitionTest>AbstractProcessEngineTestCase.runBare:115->testAcquiringEverLivingJobSucceeds:116 expected:<2013-03-18T[08:00:1]0.000> but was:<2013-03-18T[12:00:0]0.000>
[ERROR] CompetingHistoryCleanupAcquisitionTest>AbstractProcessEngineTestCase.runBare:115->testReschedulingEverLivingJobSucceeds:160 expected:<2013-03-18T[08:00:1]0.000> but was:<2013-03-18T[12:00:0]0.000>
[ERROR] Errors:
[ERROR] AsyncEmailTaskTest>AbstractProcessEngineTestCase.runBare:115->testSimpleTextMail:42->AbstractProcessEngineTestCase.waitForJobExecutorToProcessAllJobs:280 » ProcessEngine
[ERROR] AsyncEmailTaskTest>AbstractProcessEngineTestCase.runBare:115->testSimpleTextMailSendTask:61->AbstractProcessEngineTestCase.waitForJobExecutorToProcessAllJobs:280 » ProcessEngine
[INFO]
[ERROR] Tests run: 14390, Failures: 18, Errors: 2, Skipped: 29
Basically, the build should work in any timezone outside Europe/Berlin