* @param jobId job id
* @param createDate create date
* @throws Exception thrown if failed
*/
private void _testTimeout(final String jobId, Date createDate) throws Exception {
final CoordinatorEngine ce = new CoordinatorEngine(getTestUser(), "UNIT_TESTING");
waitFor(12000, new Predicate() {
public boolean evaluate() throws Exception {
CoordinatorJob job = ce.getCoordJob(jobId);
return !(job.getStatus().equals(CoordinatorJob.Status.PREP));
}
});
CoordinatorJob job = ce.getCoordJob(jobId);
assertTrue(!(job.getStatus().equals(CoordinatorJob.Status.PREP)));
waitFor(12000, new Predicate() {
public boolean evaluate() throws Exception {
CoordinatorJob job = ce.getCoordJob(jobId);
List<CoordinatorAction> actions = job.getActions();
return actions.size() > 0;
}
});
job = ce.getCoordJob(jobId);
List<CoordinatorAction> actions = job.getActions();
assertTrue(actions.size() > 0);
for (CoordinatorAction action : actions) {
JsonCoordinatorAction jsonAction = (JsonCoordinatorAction) action;