From 4f151f85ab3a83aa2ae28fef3f621a84b62f9bda Mon Sep 17 00:00:00 2001 From: Martin Weiler Date: Thu, 28 Nov 2024 13:58:41 -0700 Subject: [PATCH] Use parseToDateWithTimeAndMillis to make sure calculation is exact --- .../org/jbpm/process/core/timer/BusinessCalendarImplTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jbpm/jbpm-flow/src/test/java/org/jbpm/process/core/timer/BusinessCalendarImplTest.java b/jbpm/jbpm-flow/src/test/java/org/jbpm/process/core/timer/BusinessCalendarImplTest.java index 55dc2c9ef78..f29e7c006aa 100755 --- a/jbpm/jbpm-flow/src/test/java/org/jbpm/process/core/timer/BusinessCalendarImplTest.java +++ b/jbpm/jbpm-flow/src/test/java/org/jbpm/process/core/timer/BusinessCalendarImplTest.java @@ -374,11 +374,11 @@ public void testCalculateMinutesBeforeStartHour() { config.setProperty(BusinessCalendarImpl.HOURS_PER_DAY, "4"); config.setProperty(BusinessCalendarImpl.START_HOUR, "14"); config.setProperty(BusinessCalendarImpl.END_HOUR, "18"); - String currentDate = "2024-11-28 10:48:33"; + String currentDate = "2024-11-28 10:48:33.000"; String duration = "10m"; String expectedDate = "2024-11-28 14:10:00"; - SessionPseudoClock clock = new StaticPseudoClock(parseToDateWithTime(currentDate).getTime()); + SessionPseudoClock clock = new StaticPseudoClock(parseToDateWithTimeAndMillis(currentDate).getTime()); BusinessCalendarImpl businessCal = new BusinessCalendarImpl(config, clock); Date result = businessCal.calculateBusinessTimeAsDate(duration);