final JPAService jpaService = Services.get().get(JPAService.class);
assertNotNull(jpaService);
waitFor(10000, new Predicate() {
public boolean evaluate() throws Exception {
CoordActionGetJPAExecutor coordGetCmd = new CoordActionGetJPAExecutor(actionId);
CoordinatorActionBean newAction = jpaService.execute(coordGetCmd);
return (newAction.getStatus() != CoordinatorAction.Status.WAITING);
}
});
CoordActionGetJPAExecutor coordGetCmd = new CoordActionGetJPAExecutor(actionId);
action = jpaService.execute(coordGetCmd);
if (action.getStatus() == CoordinatorAction.Status.WAITING) {
fail("recovery waiting coord action failed, action is WAITING");
}
}