Skip to content

Commit

Permalink
Quick fix for failing cron tests due to new year. More thorough inves…
Browse files Browse the repository at this point in the history
…tigation needed for better fix. (azkaban#1596)
  • Loading branch information
inramana authored Jan 2, 2018
1 parent 7b7833a commit 1d90fb3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions azkaban-common/src/test/java/azkaban/utils/UtilsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ public void testValidCronExpressionV() {

final DateTimeZone timezone = DateTimeZone.getDefault();
Assert.assertTrue(Utils.isCronExpressionValid("0 0 3 ? * *", timezone));
Assert.assertTrue(Utils.isCronExpressionValid("0 0 3 ? * * 2017", timezone));
Assert.assertTrue(Utils.isCronExpressionValid("0 0 3 ? * * 2018", timezone));
Assert.assertTrue(Utils.isCronExpressionValid("0 0 * ? * *", timezone));
Assert.assertTrue(Utils.isCronExpressionValid("0 0 * ? * FRI", timezone));

// This is a bug from Quartz Cron. It looks like Quartz will parse the preceding 7 fields of a String.
Assert.assertTrue(Utils.isCronExpressionValid("0 0 3 ? * * 2017 22", timezone));
Assert.assertTrue(Utils.isCronExpressionValid("0 0 3 ? * * 2018 22", timezone));
}

/* Test CronExpression invalid cases*/
Expand Down

0 comments on commit 1d90fb3

Please sign in to comment.