activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [activemq] branch master updated: NO-JIRA: CronParserTest is failing in Indian StandardTime
Date Sun, 17 Nov 2019 05:56:26 GMT
This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/master by this push:
     new b65fedf  NO-JIRA: CronParserTest is failing in Indian StandardTime
     new 057b950  Merge pull request #322 from deeyes24/failing_cronparsertest_inIndia
b65fedf is described below

commit b65fedf4dd9a7fa5d0327e8a61e750a4be413531
Author: 212726340 <sumanth.donthula@ge.com>
AuthorDate: Fri Nov 23 15:49:04 2018 +0530

    NO-JIRA: CronParserTest is failing in Indian StandardTime
---
 .../activemq/broker/scheduler/CronParserTest.java  | 28 +++++++++++-----------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/activemq-client/src/test/java/org/apache/activemq/broker/scheduler/CronParserTest.java
b/activemq-client/src/test/java/org/apache/activemq/broker/scheduler/CronParserTest.java
index 05be539..6e5eb69 100644
--- a/activemq-client/src/test/java/org/apache/activemq/broker/scheduler/CronParserTest.java
+++ b/activemq-client/src/test/java/org/apache/activemq/broker/scheduler/CronParserTest.java
@@ -16,18 +16,21 @@
  */
 package org.apache.activemq.broker.scheduler;
 
-import static org.junit.Assert.assertEquals;
-
-import static org.junit.Assert.fail;
-
-import java.time.*;
-import java.util.Calendar;
-import java.util.List;
-import javax.jms.MessageFormatException;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.jms.MessageFormatException;
+import java.time.Instant;
+import java.time.LocalDateTime;
+import java.time.OffsetDateTime;
+import java.time.ZoneId;
+import java.util.Calendar;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
 public class CronParserTest {
 
     private static final Logger LOG = LoggerFactory.getLogger(CronParserTest.class);
@@ -270,12 +273,9 @@ public class CronParserTest {
 
         calender.setTimeInMillis(next);
         LOG.debug("next:" + calender.getTime());
-        long result = next - current;
-        if (startHours == 20 && startMinutes == 50) {
-            assertEquals(60*40*1000,result); // allow for 30 min offset timezone
-        } else {
-            assertEquals(60*10*1000,result);
-        }
+        int nextMinutes=calender.get(Calendar.MINUTE);
+        assertEquals(30,nextMinutes);
+
     }
 
     @Test


Mime
View raw message