Skip to content

Commit a30f6b7

Browse files
authored
Merge pull request kubernetes#119506 from mimowo/fix-job-controller-flaky-test
Fix the flaky TestJobApiBackoffReset test
2 parents 4e8908d + dbea279 commit a30f6b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/controller/job/job_controller_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4676,10 +4676,11 @@ func TestJobApiBackoffReset(t *testing.T) {
46764676
if retries != 1 {
46774677
t.Fatalf("%s: expected exactly 1 retry, got %d", job.Name, retries)
46784678
}
4679+
// await for the actual requeue after processing of the pending queue is done
4680+
awaitForQueueLen(ctx, t, manager, 1)
46794681

46804682
// the queue is emptied on success
46814683
fakePodControl.Err = nil
4682-
manager.clock.Sleep(fastJobApiBackoff)
46834684
manager.processNextWorkItem(context.TODO())
46844685
verifyEmptyQueue(ctx, t, manager)
46854686
}

0 commit comments

Comments
 (0)