Merge pull request #119506 from mimowo/fix-job-controller-flaky-test
Fix the flaky TestJobApiBackoffReset test
This commit is contained in:
		@@ -4676,10 +4676,11 @@ func TestJobApiBackoffReset(t *testing.T) {
 | 
				
			|||||||
	if retries != 1 {
 | 
						if retries != 1 {
 | 
				
			||||||
		t.Fatalf("%s: expected exactly 1 retry, got %d", job.Name, retries)
 | 
							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
 | 
						// the queue is emptied on success
 | 
				
			||||||
	fakePodControl.Err = nil
 | 
						fakePodControl.Err = nil
 | 
				
			||||||
	manager.clock.Sleep(fastJobApiBackoff)
 | 
					 | 
				
			||||||
	manager.processNextWorkItem(context.TODO())
 | 
						manager.processNextWorkItem(context.TODO())
 | 
				
			||||||
	verifyEmptyQueue(ctx, t, manager)
 | 
						verifyEmptyQueue(ctx, t, manager)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user