Skip to content

Commit 484dced

Browse files
asm582openshift-merge-robot
authored andcommitted
fix unit tests
1 parent 4bd1722 commit 484dced

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/controller/queuejob/queuejob_controller_ex.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1838,7 +1838,7 @@ func (cc *XController) worker() {
18381838
return nil
18391839
}
18401840

1841-
if !queuejob.Status.CanRun && (queuejob.Status.State != arbv1.AppWrapperStateActive || queuejob.Status.State != arbv1.AppWrapperStateCompleted || queuejob.Status.State != arbv1.AppWrapperStateFailed) {
1841+
if !queuejob.Status.CanRun && (queuejob.Status.State != arbv1.AppWrapperStateActive) {
18421842
cc.ScheduleNext(queuejob)
18431843
// sync AppWrapper
18441844
return nil
@@ -2018,6 +2018,7 @@ func (cc *XController) manageQueueJob(ctx context.Context, qj *arbv1.AppWrapper,
20182018

20192019
qj.Status.State = arbv1.AppWrapperStateFailed
20202020
qj.Status.QueueJobState = arbv1.AppWrapperCondFailed
2021+
qj.Status.CanRun = false
20212022
if !isLastConditionDuplicate(qj, arbv1.AppWrapperCondFailed, v1.ConditionTrue, dispatchFailureReason, dispatchFailureMessage) {
20222023
cond := GenerateAppWrapperCondition(arbv1.AppWrapperCondFailed, v1.ConditionTrue, dispatchFailureReason, dispatchFailureMessage)
20232024
qj.Status.Conditions = append(qj.Status.Conditions, cond)

0 commit comments

Comments
 (0)