[ 
https://issues.apache.org/jira/browse/OOZIE-2429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15163401#comment-15163401
 ] 

Purshotam Shah commented on OOZIE-2429:
---------------------------------------

I think the patch try to avoid any operation if there are no changes in coord 
action. This can be easily done by adding extra and condition in existing 
verifyPrecondition.  

    protected void verifyPrecondition() throws CommandException, 
PreconditionException {
        // if coord action is RUNNING and pending false and workflow is 
RUNNING, this doesn't need to be updated.
                {color:red}// if coord action status == workflow, then coord 
action is already updated {color}
        if (workflow.getStatus() == WorkflowJob.Status.RUNNING && {color:red} 
!workflow.getStatus().equals(coordAction.getStatus()) {color}
                && coordAction.getStatus() == CoordinatorAction.Status.RUNNING 
&& !coordAction.isPending()) {
            try {
                CoordActionQueryExecutor.getInstance().executeUpdate(
                        
CoordActionQueryExecutor.CoordActionQuery.UPDATE_COORD_ACTION_STATUS_PENDING_TIME,
 coordAction);
            }
            catch (JPAExecutorException je) {
                throw new CommandException(je);
            }
            throw new PreconditionException(ErrorCode.E1100, ", workflow is 
RUNNING and coordinator action is RUNNING and pending false");
        }
    }


> TestEventGeneration test is flakey
> ----------------------------------
>
>                 Key: OOZIE-2429
>                 URL: https://issues.apache.org/jira/browse/OOZIE-2429
>             Project: Oozie
>          Issue Type: Bug
>          Components: action, tests
>    Affects Versions: trunk
>            Reporter: Ferenc Denes
>            Assignee: Ferenc Denes
>            Priority: Minor
>             Fix For: trunk
>
>         Attachments: OOZIE-2429-1.patch, OOZIE-2429-2.patch
>
>
> TestEventGeneration's testForNoDuplicates fails tome to time depending on the 
> circumstances of the test.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to