aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Sirois" <john.sir...@gmail.com>
Subject Review Request 41528: Fixup `getJobSummary` for cron jobs with invalid next run dates.
Date Thu, 17 Dec 2015 20:01:51 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41528/
-----------------------------------------------------------

Review request for Aurora, Bill Farner and Zameer Manji.


Bugs: AURORA-1385
    https://issues.apache.org/jira/browse/AURORA-1385


Repository: aurora


Description
-------

Previously,  the fact `null` could be returned by Quartz when
calculating the next run was not taken into account.  Now The
CronPredictor interface makes this possibility manifest with an
Optional result.

Code that uses the CronPredictor is adjusted and tests are added.

NB: This code is as first proposed here by Brice Arnould with small
changes: https://reviews.apache.org/r/39170/

 src/main/java/org/apache/aurora/scheduler/cron/CronPredictor.java                | 10 ++++++++--
 src/main/java/org/apache/aurora/scheduler/cron/quartz/CronPredictorImpl.java     |  8 +++++---
 src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java      | 13 ++++++++-----
 src/test/java/org/apache/aurora/scheduler/cron/quartz/CronPredictorImplTest.java | 23 +++++++++++++++++++----
 src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java  | 35 ++++++++++++++++++++++++++++++++---
 5 files changed, 72 insertions(+), 17 deletions(-)


Diffs
-----

  src/main/java/org/apache/aurora/scheduler/cron/CronPredictor.java 043ba7e6858db28001dfb07ea0c2ddf274a1c755

  src/main/java/org/apache/aurora/scheduler/cron/quartz/CronPredictorImpl.java 1ddc4e1946910de798f7f423dd1b19ed56dece15

  src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java c0e8a201400338a8cb6bc24b2c21d0abb0d01e41

  src/test/java/org/apache/aurora/scheduler/cron/quartz/CronPredictorImplTest.java b85f4abd59ef64264fb089527ad42b9ceee7f8d6

  src/test/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImplTest.java 6efe03fe4841cf1275e2ee0c7cc1b9576540f34e


Diff: https://reviews.apache.org/r/41528/diff/


Testing
-------

Green locally: `./gradlew -Pq build`


Thanks,

John Sirois


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message