activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject activemq git commit: Fixed bug in cron test. #58 - patch applied with thanks
Date Mon, 26 Jan 2015 21:20:36 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk bf5a2997c -> 60c9d03e1


Fixed bug in cron test. #58 - patch applied with thanks


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/60c9d03e
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/60c9d03e
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/60c9d03e

Branch: refs/heads/trunk
Commit: 60c9d03e1df55bd93201901038887a221af0e717
Parents: bf5a299
Author: gtully <gary.tully@gmail.com>
Authored: Mon Jan 26 21:20:03 2015 +0000
Committer: gtully <gary.tully@gmail.com>
Committed: Mon Jan 26 21:20:10 2015 +0000

----------------------------------------------------------------------
 .../org/apache/activemq/broker/scheduler/CronParserTest.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/60c9d03e/activemq-client/src/test/java/org/apache/activemq/broker/scheduler/CronParserTest.java
----------------------------------------------------------------------
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 3c71869..395a87d 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
@@ -216,13 +216,19 @@ public class CronParserTest {
         long current = 20*60*1000;
         Calendar calender = Calendar.getInstance();
         calender.setTimeInMillis(current);
+        int startHours = calender.get(Calendar.HOUR_OF_DAY);
+        int startMinutes = calender.get(Calendar.MINUTE);
         LOG.debug("start:" + calender.getTime());
         long next = CronParser.getNextScheduledTime(test, current);
 
         calender.setTimeInMillis(next);
         LOG.debug("next:" + calender.getTime());
         long result = next - current;
-        assertEquals(60*10*1000,result);
+        if (startHours == 8 && startMinutes == 50) {
+            assertEquals(60*40*1000,result);
+        } else {
+            assertEquals(60*10*1000,result);
+        }
     }
 
     @Test


Mime
View raw message