-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
tested 1.393 and 1.395
clone of HUDSON-8656
@Test public void testHudsonCeil() throws ANTLRException { final Calendar cal = Calendar.getInstance(); cal.set(2011, 0, 16, 0, 0, 0); // Sunday, Jan 16th 2011, 00:00 final String cronStr = "0 23 * * 1-5"; // execute on weekdays @23:00 final CronTab cron = new CronTab(cronStr); final Calendar next = cron.ceil(cal); final Calendar expectedDate = Calendar.getInstance(); expectedDate.set(2011, 0, 17, 23, 0, 0); // Expected next: Monday, Jan 17th 2011, 23:00 Assert.assertEquals(expectedDate.get(Calendar.HOUR), next.get(Calendar.HOUR)); Assert.assertEquals(expectedDate.get(Calendar.MINUTE), next.get(Calendar.MINUTE)); Assert.assertEquals(expectedDate.get(Calendar.YEAR), next.get(Calendar.YEAR)); Assert.assertEquals(expectedDate.get(Calendar.MONTH), next.get(Calendar.MONTH)); Assert.assertEquals(expectedDate.get(Calendar.DAY_OF_MONTH), next.get(Calendar.DAY_OF_MONTH)); // FAILS: is Monday, Jan 10th, 23:00 }
- is related to
-
JENKINS-8401 hudson.scheduler.CronTabTest unit test failure.
- Resolved
-
JENKINS-8583 Problem with backup cron schedule
- Resolved