Skip to content

Commit

Permalink
Fix the flaky TestJobApiBackoffReset test
Browse files Browse the repository at this point in the history
  • Loading branch information
mimowo committed Jul 21, 2023
1 parent 4457f85 commit dbea279
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/controller/job/job_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4602,10 +4602,11 @@ func TestJobApiBackoffReset(t *testing.T) {
if retries != 1 {
t.Fatalf("%s: expected exactly 1 retry, got %d", job.Name, retries)
}
// await for the actual requeue after processing of the pending queue is done
awaitForQueueLen(ctx, t, manager, 1)

// the queue is emptied on success
fakePodControl.Err = nil
manager.clock.Sleep(fastJobApiBackoff)
manager.processNextWorkItem(context.TODO())
verifyEmptyQueue(ctx, t, manager)
}
Expand Down

0 comments on commit dbea279

Please sign in to comment.