use of org.apache.oozie.CoordinatorWfActionBean in project oozie by apache.
the class TestCoordWfActionInfoXCommand method testActionMissing.
public void testActionMissing() throws CommandException {
List<CoordinatorWfActionBean> coordWfActions = new CoordWfActionInfoXCommand(coordJob.getId(), "aa", 2, 3).call();
assertEquals(3, coordWfActions.size());
assertEquals(wfJobs.get(1).getId(), coordWfActions.get(0).getAction().getWfId());
assertEquals(wfJobs.get(2).getId(), coordWfActions.get(1).getAction().getWfId());
CoordinatorWfActionBean coordWfAction = coordWfActions.get(2);
assertEquals(4, coordWfAction.getActionNumber());
assertEquals(null, coordWfAction.getAction());
String expectNullReason = CoordinatorWfAction.NullReason.ACTION_NULL.getNullReason("aa", wfJobs.get(3).getId());
assertEquals(expectNullReason, coordWfAction.getNullReason());
}
use of org.apache.oozie.CoordinatorWfActionBean in project oozie by apache.
the class MockCoordinatorEngineService method reset.
public static void reset() {
did = null;
offset = null;
length = null;
order = null;
filter = null;
coordJobs = new ArrayList<CoordinatorJob>();
coordWfActions = new ArrayList<CoordinatorWfActionBean>();
startedCoordJobs = new ArrayList<Boolean>();
for (int i = 0; i < INIT_COORD_COUNT; i++) {
coordJobs.add(createDummyCoordinatorJob(i));
startedCoordJobs.add(false);
}
for (int i = 0; i < INIT_WF_ACTION_COUNT; i++) {
coordWfActions.add(createDummyCoordWfAction("actionTest", i + 1));
}
String nullReason = CoordinatorWfAction.NullReason.ACTION_NULL.getNullReason("actionTest2", "wf1");
coordWfActions.add(new CoordinatorWfActionBean(INIT_WF_ACTION_COUNT + 1, null, nullReason));
}
Aggregations