Change:
now time.Time // expectations <del> expectCreate               bool expectDelete               bool expectActive               int expectedWarnings           int expectErr                  bool expectRequeueAfter         bool jobStillNotFoundInLister   bool jobPresentInCJActiveStatus bool jobCreateError             error </del> <ins> expectCreate             bool expectDelete             bool expectActive             int expectedWarnings         int expectErr                bool expectRequeueAfter       bool jobStillNotFoundInLister bool jobCreateError           error </ins> }{ <del> "never ran, not valid schedule, A":      {A, F, errorSchedule, noDead, F, F, justAfterThePriorHour(), justBeforeTheHour(), F, F, 0, 1, F, F, F, T, nil}, "never ran, not valid schedule, F":      {f, F, errorSchedule, noDead, F, F, justAfterThePriorHour(), justBeforeTheHour(), F, F, 0, 1, F, F, F, T, nil}, "never ran, not valid schedule, R":      {f, F, errorSchedule, noDead, F, F, justAfterThePriorHour(), justBeforeTheHour(), F, F, 0, 1, F, F, F, T, nil}, "never ran, not time, A":                {A, F, onTheHour, noDead, F, F, justAfterThePriorHour(), justBeforeTheHour(), F, F, 0, 0, F, T, F, T, nil}, "never ran, not time, F":                {f, F, onTheHour, noDead, F, F, justAfterThePriorHour(), justBeforeTheHour(), F, F, 0, 0, F, T, F, T, nil}, "never ran, not time, R":                {R, F, onTheHour, noDead, F, F, justAfterThePriorHour(), justBeforeTheHour(), F, F, 0, 0, F, T, F, T, nil}, "never ran, is time, A":                 {A, F, onTheHour, noDead, F, F, justAfterThePriorHour(), *justAfterTheHour(), T, F, 1, 0, F, T, F, T, nil}, "never ran, is time, F":                 {f, F, onTheHour, noDead, F, F, justAfterThePriorHour(), *justAfterTheHour(), T, F, 1, 0, F, T, F, T, nil}, "never ran, is time, R":                 {R, F, onTheHour, noDead, F, F, justAfterThePriorHour(), *justAfterTheHour(), T, F, 1, 0, F, T, F, T, nil}, "never ran, is time, suspended":         {A, T, onTheHour, noDead, F, F, justAfterThePriorHour(), *justAfterTheHour(), F, F, 0, 0, F, F, F, T, nil}, "never ran, is time, past deadline":     {A, F, onTheHour, shortDead, F, F, justAfterThePriorHour(), justAfterTheHour().Add(time.Minute * time.Duration(shortDead+1)), F, F, 0, 0, F, T, F, T, nil}, "never ran, is time, not past deadline": {A, F, onTheHour, longDead, F, F, justAfterThePriorHour(), *justAfterTheHour(), T, F, 1, 0, F, T, F, T, nil}, "prev ran but done, not time, A":                {A, F, onTheHour, noDead, T, F, justAfterThePriorHour(), justBeforeTheHour(), F, F, 0, 0, F, T, F, T, nil}, "prev ran but done, not time, F":                {f, F, onTheHour, noDead, T, F, justAfterThePriorHour(), justBeforeTheHour(), F, F, 0, 0, F, T, F, T, nil}, "prev ran but done, not time, R":                {R, F, onTheHour, noDead, T, F, justAfterThePriorHour(), justBeforeTheHour(), F, F, 0, 0, F, T, F, T, nil}, "prev ran but done, is time, A":                 {A, F, onTheHour, noDead, T, F, justAfterThePriorHour(), *justAfterTheHour(), T, F, 1, 0, F, T, F, T, nil}, "prev ran but done, is time, F":                 {f, F, onTheHour, noDead, T, F, justAfterThePriorHour(), *justAfterTheHour(), T, F, 1, 0, F, T, F, T, nil}, "prev ran but done, is time, R":                 {R, F, onTheHour, noDead, T, F, justAfterThePriorHour(), *justAfterTheHour(), T, F, 1, 0, F, T, F, T, nil}, "prev ran but done, is time, suspended":         {A, T, onTheHour, noDead, T, F, justAfterThePriorHour(), *justAfterTheHour(), F, F, 0, 0, F, F, F, T, nil}, "prev ran but done, is time, past deadline":     {A, F, onTheHour, shortDead, T, F, justAfterThePriorHour(), *justAfterTheHour(), F, F, 0, 0, F, T, F, T, nil}, "prev ran but done, is time, not past deadline": {A, F, onTheHour, longDead, T, F, justAfterThePriorHour(), *justAfterTheHour(), T, F, 1, 0, F, T, F, T, nil}, "still active, not time, A":                {A, F, onTheHour, noDead, T, T, justAfterThePriorHour(), justBeforeTheHour(), F, F, 1, 0, F, T, F, T, nil}, "still active, not time, F":                {f, F, onTheHour, noDead, T, T, justAfterThePriorHour(), justBeforeTheHour(), F, F, 1, 0, F, T, F, T, nil}, "still active, not time, R":                {R, F, onTheHour, noDead, T, T, justAfterThePriorHour(), justBeforeTheHour(), F, F, 1, 0, F, T, F, T, nil}, "still active, is time, A":                 {A, F, onTheHour, noDead, T, T, justAfterThePriorHour(), *justAfterTheHour(), T, F, 2, 0, F, T, F, T, nil}, "still active, is time, F":                 {f, F, onTheHour, noDead, T, T, justAfterThePriorHour(), *justAfterTheHour(), F, F, 1, 0, F, T, F, T, nil}, "still active, is time, R":                 {R, F, onTheHour, noDead, T, T, justAfterThePriorHour(), *justAfterTheHour(), T, T, 1, 0, F, T, F, T, nil}, "still active, is time, suspended":         {A, T, onTheHour, noDead, T, T, justAfterThePriorHour(), *justAfterTheHour(), F, F, 1, 0, F, F, F, T, nil}, "still active, is time, past deadline":     {A, F, onTheHour, shortDead, T, T, justAfterThePriorHour(), *justAfterTheHour(), F, F, 1, 0, F, T, F, T, nil}, "still active, is time, not past deadline": {A, F, onTheHour, longDead, T, T, justAfterThePriorHour(), *justAfterTheHour(), T, F, 2, 0, F, T, F, T, nil}, </del> <ins> "never ran, not valid schedule, A": { concurrencyPolicy:          "Allow", schedule:                   errorSchedule, deadline:                   noDead, jobCreationTime:            justAfterThePriorHour(), now:                        justBeforeTheHour(), expectedWarnings:           1, jobPresentInCJActiveStatus: true, }, "never ran, not valid schedule, F": { concurrencyPolicy:          "Forbid", schedule:                   errorSchedule, deadline:                   noDead, jobCreationTime:            justAfterThePriorHour(), now:                        justBeforeTheHour(), expectedWarnings:           1, jobPresentInCJActiveStatus: true, }, "never ran, not valid schedule, R": { concurrencyPolicy:          "Forbid", schedule:                   errorSchedule, deadline:                   noDead, jobCreationTime:            justAfterThePriorHour(), now:                        justBeforeTheHour(), expectedWarnings:           1, jobPresentInCJActiveStatus: true, }, "never ran, not time, A": { concurrencyPolicy:          "Allow", schedule:                   onTheHour, deadline:                   noDead, jobCreationTime:            justAfterThePriorHour(), now:                        justBeforeTheHour(), expectRequeueAfter:         true, jobPresentInCJActiveStatus: true}, "never ran, not time, F": { concurrencyPolicy:          "Forbid", schedule:                   onTheHour, deadline:                   noDead, jobCreationTime:            justAfterThePriorHour(), now:                        justBeforeTheHour(), expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "never ran, not time, R": { concurrencyPolicy:          "Replace", schedule:                   onTheHour, deadline:                   noDead, jobCreationTime:            justAfterThePriorHour(), now:                        justBeforeTheHour(), expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "never ran, is time, A": { concurrencyPolicy:          "Allow", schedule:                   onTheHour, deadline:                   noDead, jobCreationTime:            justAfterThePriorHour(), now:                        *justAfterTheHour(), expectCreate:               true, expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "never ran, is time, F": { concurrencyPolicy:          "Forbid", schedule:                   onTheHour, deadline:                   noDead, jobCreationTime:            justAfterThePriorHour(), now:                        *justAfterTheHour(), expectCreate:               true, expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "never ran, is time, R": { concurrencyPolicy:          "Replace", schedule:                   onTheHour, deadline:                   noDead, jobCreationTime:            justAfterThePriorHour(), now:                        *justAfterTheHour(), expectCreate:               true, expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "never ran, is time, suspended": { concurrencyPolicy:          "Allow", suspend:                    true, schedule:                   onTheHour, deadline:                   noDead, jobCreationTime:            justAfterThePriorHour(), now:                        *justAfterTheHour(), jobPresentInCJActiveStatus: true, }, "never ran, is time, past deadline": { concurrencyPolicy:          "Allow", schedule:                   onTheHour, deadline:                   shortDead, jobCreationTime:            justAfterThePriorHour(), now:                        justAfterTheHour().Add(time.Minute * time.Duration(shortDead+1)), expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "never ran, is time, not past deadline": { concurrencyPolicy:          "Allow", schedule:                   onTheHour, deadline:                   longDead, jobCreationTime:            justAfterThePriorHour(), now:                        *justAfterTheHour(), expectCreate:               true, expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "prev ran but done, not time, A": { concurrencyPolicy:          "Allow", schedule:                   onTheHour, deadline:                   noDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        justBeforeTheHour(), expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "prev ran but done, not time, F": { concurrencyPolicy:          "Forbid", schedule:                   onTheHour, deadline:                   noDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        justBeforeTheHour(), expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "prev ran but done, not time, R": { concurrencyPolicy:          "Replace", schedule:                   onTheHour, deadline:                   noDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        justBeforeTheHour(), expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "prev ran but done, is time, A": { concurrencyPolicy:          "Allow", schedule:                   onTheHour, deadline:                   noDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        *justAfterTheHour(), expectCreate:               true, expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "prev ran but done, is time, F": { concurrencyPolicy:          "Forbid", schedule:                   onTheHour, deadline:                   noDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        *justAfterTheHour(), expectCreate:               true, expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "prev ran but done, is time, R": { concurrencyPolicy:          "Replace", schedule:                   onTheHour, deadline:                   noDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        *justAfterTheHour(), expectCreate:               true, expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "prev ran but done, is time, suspended": { concurrencyPolicy:          "Allow", suspend:                    true, schedule:                   onTheHour, deadline:                   noDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        *justAfterTheHour(), jobPresentInCJActiveStatus: true, }, "prev ran but done, is time, past deadline": { concurrencyPolicy:          "Allow", schedule:                   onTheHour, deadline:                   shortDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        *justAfterTheHour(), expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "prev ran but done, is time, not past deadline": { concurrencyPolicy:          "Allow", schedule:                   onTheHour, deadline:                   longDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        *justAfterTheHour(), expectCreate:               true, expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "still active, not time, A": { concurrencyPolicy:          "Allow", schedule:                   onTheHour, deadline:                   noDead, ranPreviously:              true, stillActive:                true, jobCreationTime:            justAfterThePriorHour(), now:                        justBeforeTheHour(), expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "still active, not time, F": { concurrencyPolicy:          "Forbid", schedule:                   onTheHour, deadline:                   noDead, ranPreviously:              true, stillActive:                true, jobCreationTime:            justAfterThePriorHour(), now:                        justBeforeTheHour(), expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "still active, not time, R": { concurrencyPolicy:          "Replace", schedule:                   onTheHour, deadline:                   noDead, ranPreviously:              true, stillActive:                true, jobCreationTime:            justAfterThePriorHour(), now:                        justBeforeTheHour(), expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "still active, is time, A": { concurrencyPolicy:          "Allow", schedule:                   onTheHour, deadline:                   noDead, ranPreviously:              true, stillActive:                true, jobCreationTime:            justAfterThePriorHour(), now:                        *justAfterTheHour(), expectCreate:               true, expectActive:               2, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "still active, is time, F": { concurrencyPolicy:          "Forbid", schedule:                   onTheHour, deadline:                   noDead, ranPreviously:              true, stillActive:                true, jobCreationTime:            justAfterThePriorHour(), now:                        *justAfterTheHour(), expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "still active, is time, R": { concurrencyPolicy:          "Replace", schedule:                   onTheHour, deadline:                   noDead, ranPreviously:              true, stillActive:                true, jobCreationTime:            justAfterThePriorHour(), now:                        *justAfterTheHour(), expectCreate:               true, expectDelete:               true, expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "still active, is time, suspended": { concurrencyPolicy:          "Allow", suspend:                    true, schedule:                   onTheHour, deadline:                   noDead, ranPreviously:              true, stillActive:                true, jobCreationTime:            justAfterThePriorHour(), now:                        *justAfterTheHour(), expectActive:               1, jobPresentInCJActiveStatus: true, }, "still active, is time, past deadline": { concurrencyPolicy:          "Allow", schedule:                   onTheHour, deadline:                   shortDead, ranPreviously:              true, stillActive:                true, jobCreationTime:            justAfterThePriorHour(), now:                        *justAfterTheHour(), expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "still active, is time, not past deadline": { concurrencyPolicy:          "Allow", schedule:                   onTheHour, deadline:                   longDead, ranPreviously:              true, stillActive:                true, jobCreationTime:            justAfterThePriorHour(), now:                        *justAfterTheHour(), expectCreate:               true, expectActive:               2, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, </ins> // Controller should fail to schedule these, as there are too many missed starting times // and either no deadline or a too long deadline. <del> "prev ran but done, long overdue, not past deadline, A": {A, F, onTheHour, longDead, T, F, justAfterThePriorHour(), weekAfterTheHour(), T, F, 1, 1, F, T, F, T, nil}, "prev ran but done, long overdue, not past deadline, R": {R, F, onTheHour, longDead, T, F, justAfterThePriorHour(), weekAfterTheHour(), T, F, 1, 1, F, T, F, T, nil}, "prev ran but done, long overdue, not past deadline, F": {f, F, onTheHour, longDead, T, F, justAfterThePriorHour(), weekAfterTheHour(), T, F, 1, 1, F, T, F, T, nil}, "prev ran but done, long overdue, no deadline, A":       {A, F, onTheHour, noDead, T, F, justAfterThePriorHour(), weekAfterTheHour(), T, F, 1, 1, F, T, F, T, nil}, "prev ran but done, long overdue, no deadline, R":       {R, F, onTheHour, noDead, T, F, justAfterThePriorHour(), weekAfterTheHour(), T, F, 1, 1, F, T, F, T, nil}, "prev ran but done, long overdue, no deadline, F":       {f, F, onTheHour, noDead, T, F, justAfterThePriorHour(), weekAfterTheHour(), T, F, 1, 1, F, T, F, T, nil}, </del> <ins> "prev ran but done, long overdue, not past deadline, A": { concurrencyPolicy:          "Allow", schedule:                   onTheHour, deadline:                   longDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        weekAfterTheHour(), expectCreate:               true, expectActive:               1, expectedWarnings:           1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "prev ran but done, long overdue, not past deadline, R": { concurrencyPolicy:          "Replace", schedule:                   onTheHour, deadline:                   longDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        weekAfterTheHour(), expectCreate:               true, expectActive:               1, expectedWarnings:           1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "prev ran but done, long overdue, not past deadline, F": { concurrencyPolicy:          "Forbid", schedule:                   onTheHour, deadline:                   longDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        weekAfterTheHour(), expectCreate:               true, expectActive:               1, expectedWarnings:           1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "prev ran but done, long overdue, no deadline, A": { concurrencyPolicy:          "Allow", schedule:                   onTheHour, deadline:                   noDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        weekAfterTheHour(), expectCreate:               true, expectActive:               1, expectedWarnings:           1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "prev ran but done, long overdue, no deadline, R": { concurrencyPolicy:          "Replace", schedule:                   onTheHour, deadline:                   noDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        weekAfterTheHour(), expectCreate:               true, expectActive:               1, expectedWarnings:           1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "prev ran but done, long overdue, no deadline, F": { concurrencyPolicy:          "Forbid", schedule:                   onTheHour, deadline:                   noDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        weekAfterTheHour(), expectCreate:               true, expectActive:               1, expectedWarnings:           1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, </ins> <del> "prev ran but done, long overdue, past medium deadline, A": {A, F, onTheHour, mediumDead, T, F, justAfterThePriorHour(), weekAfterTheHour(), T, F, 1, 0, F, T, F, T, nil}, "prev ran but done, long overdue, past short deadline, A":  {A, F, onTheHour, shortDead, T, F, justAfterThePriorHour(), weekAfterTheHour(), T, F, 1, 0, F, T, F, T, nil}, </del> <ins> "prev ran but done, long overdue, past medium deadline, A": { concurrencyPolicy:          "Allow", schedule:                   onTheHour, deadline:                   mediumDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        weekAfterTheHour(), expectCreate:               true, expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "prev ran but done, long overdue, past short deadline, A": { concurrencyPolicy:          "Allow", schedule:                   onTheHour, deadline:                   shortDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        weekAfterTheHour(), expectCreate:               true, expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, </ins> <del> "prev ran but done, long overdue, past medium deadline, R": {R, F, onTheHour, mediumDead, T, F, justAfterThePriorHour(), weekAfterTheHour(), T, F, 1, 0, F, T, F, T, nil}, "prev ran but done, long overdue, past short deadline, R":  {R, F, onTheHour, shortDead, T, F, justAfterThePriorHour(), weekAfterTheHour(), T, F, 1, 0, F, T, F, T, nil}, </del> <ins> "prev ran but done, long overdue, past medium deadline, R": { concurrencyPolicy:          "Replace", schedule:                   onTheHour, deadline:                   mediumDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        weekAfterTheHour(), expectCreate:               true, expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "prev ran but done, long overdue, past short deadline, R": { concurrencyPolicy:          "Replace", schedule:                   onTheHour, deadline:                   shortDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        weekAfterTheHour(), expectCreate:               true, expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, </ins> <del> "prev ran but done, long overdue, past medium deadline, F": {f, F, onTheHour, mediumDead, T, F, justAfterThePriorHour(), weekAfterTheHour(), T, F, 1, 0, F, T, F, T, nil}, "prev ran but done, long overdue, past short deadline, F":  {f, F, onTheHour, shortDead, T, F, justAfterThePriorHour(), weekAfterTheHour(), T, F, 1, 0, F, T, F, T, nil}, </del> <ins> "prev ran but done, long overdue, past medium deadline, F": { concurrencyPolicy:          "Forbid", schedule:                   onTheHour, deadline:                   mediumDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        weekAfterTheHour(), expectCreate:               true, expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, "prev ran but done, long overdue, past short deadline, F": { concurrencyPolicy:          "Forbid", schedule:                   onTheHour, deadline:                   shortDead, ranPreviously:              true, jobCreationTime:            justAfterThePriorHour(), now:                        weekAfterTheHour(), expectCreate:               true, expectActive:               1, expectRequeueAfter:         true, jobPresentInCJActiveStatus: true, }, </ins> // Tests for time skews // the controller sees job is created, takes no actions <del> "this ran but done, time drifted back, F": {f, F, onTheHour, noDead, T, F, *justAfterTheHour(), justBeforeTheHour(), F, F, 0, 0, F, T, F, F, errors.NewAlreadyExists(schema.GroupResource{Resource: "jobs", Group: "batch"}, "")}, </del> <ins> "this ran but done, time drifted back, F": { concurrencyPolicy:  "Forbid", schedule:           onTheHour, deadline:           noDead, ranPreviously:      true, jobCreationTime:    *justAfterTheHour(), now:                justBeforeTheHour(), expectRequeueAfter: true, jobCreateError:     errors.NewAlreadyExists(schema.GroupResource{Resource: "jobs", Group: "batch"}, "")}, </ins> // Tests for slow job lister <del> "this started but went missing, not past deadline, A": {A, F, onTheHour, longDead, T, T, topOfTheHour().Add(time.Millisecond * 100), justAfterTheHour().Add(time.Millisecond * 100), F, F, 1, 0, F, T, T, T, nil}, "this started but went missing, not past deadline, f": {f, F, onTheHour, longDead, T, T, topOfTheHour().Add(time.Millisecond * 100), justAfterTheHour().Add(time.Millisecond * 100), F, F, 1, 0, F, T, T, T, nil}, "this started but went missing, not past deadline, R": {R, F, onTheHour, longDead, T, T, topOfTheHour().Add(time.Millisecond * 100), justAfterTheHour().Add(time.Millisecond * 100), F, F, 1, 0, F, T, T, T, nil}, </del> <ins> "this started but went missing, not past deadline, A": { concurrencyPolicy:          "Allow", schedule:                   onTheHour, deadline:                   longDead, ranPreviously:              true, stillActive:                true, jobCreationTime:            topOfTheHour().Add(time.Millisecond * 100), now:                        justAfterTheHour().Add(time.Millisecond * 100), expectActive:               1, expectRequeueAfter:         true, jobStillNotFoundInLister:   true, jobPresentInCJActiveStatus: true, }, "this started but went missing, not past deadline, f": { concurrencyPolicy:          "Forbid", schedule:                   onTheHour, deadline:                   longDead, ranPreviously:              true, stillActive:                true, jobCreationTime:            topOfTheHour().Add(time.Millisecond * 100), now:                        justAfterTheHour().Add(time.Millisecond * 100), expectActive:               1, expectRequeueAfter:         true, jobStillNotFoundInLister:   true, jobPresentInCJActiveStatus: true, }, "this started but went missing, not past deadline, R": { concurrencyPolicy:          "Replace", schedule:                   onTheHour, deadline:                   longDead, ranPreviously:              true, stillActive:                true, jobCreationTime:            topOfTheHour().Add(time.Millisecond * 100), now:                        justAfterTheHour().Add(time.Millisecond * 100), expectActive:               1, expectRequeueAfter:         true, jobStillNotFoundInLister:   true, jobPresentInCJActiveStatus: true, }, </ins> // Tests for slow cronjob list <del> "this started but is not present in cronjob active list, not past deadline, A": {A, F, onTheHour, longDead, T, T, topOfTheHour().Add(time.Millisecond * 100), justAfterTheHour().Add(time.Millisecond * 100), F, F, 1, 0, F, T, F, F, nil}, "this started but is not present in cronjob active list, not past deadline, f": {f, F, onTheHour, longDead, T, T, topOfTheHour().Add(time.Millisecond * 100), justAfterTheHour().Add(time.Millisecond * 100), F, F, 1, 0, F, T, F, F, nil}, "this started but is not present in cronjob active list, not past deadline, R": {R, F, onTheHour, longDead, T, T, topOfTheHour().Add(time.Millisecond * 100), justAfterTheHour().Add(time.Millisecond * 100), F, F, 1, 0, F, T, F, F, nil}, </del> <ins> "this started but is not present in cronjob active list, not past deadline, A": { concurrencyPolicy:  "Allow", schedule:           onTheHour, deadline:           longDead, ranPreviously:      true, stillActive:        true, jobCreationTime:    topOfTheHour().Add(time.Millisecond * 100), now:                justAfterTheHour().Add(time.Millisecond * 100), expectActive:       1, expectRequeueAfter: true, }, "this started but is not present in cronjob active list, not past deadline, f": { concurrencyPolicy:  "Forbid", schedule:           onTheHour, deadline:           longDead, ranPreviously:      true, stillActive:        true, jobCreationTime:    topOfTheHour().Add(time.Millisecond * 100), now:                justAfterTheHour().Add(time.Millisecond * 100), expectActive:       1, expectRequeueAfter: true, }, "this started but is not present in cronjob active list, not past deadline, R": { concurrencyPolicy:  "Replace", schedule:           onTheHour, deadline:           longDead, ranPreviously:      true, stillActive:        true, jobCreationTime:    topOfTheHour().Add(time.Millisecond * 100), now:                justAfterTheHour().Add(time.Millisecond * 100), expectActive:       1, expectRequeueAfter: true, }, </ins> } for name, tc := range testCases { name := name

Discussion:
in TestControllerV2SyncCronJob, there are many listing the properties that don't matter (like nil, false). and many constants F and T, which is unnecessary. As per 's request, We shouldn't be listing the properties that don't matter (like nil, false). And get rid of constants F and T check No response <details</details<detailsNone </details<details</details<details</details<details</details<details</details
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/assign I would like to work on the optimization
It's not an optimization. It's just about readability.
/remove-kind bug /kind cleanup
/sig apps