mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Removing custom test timeout
This commit is contained in:
@@ -97,13 +97,9 @@ func NewJobController(kubeClient client.Interface) *JobController {
|
||||
framework.ResourceEventHandlerFuncs{
|
||||
AddFunc: jm.enqueueController,
|
||||
UpdateFunc: func(old, cur interface{}) {
|
||||
job := cur.(*experimental.Job)
|
||||
for _, c := range job.Status.Conditions {
|
||||
if c.Type == experimental.JobComplete && c.Status == api.ConditionTrue {
|
||||
return
|
||||
}
|
||||
if job := cur.(*experimental.Job); !isJobFinished(job) {
|
||||
jm.enqueueController(job)
|
||||
}
|
||||
jm.enqueueController(cur)
|
||||
},
|
||||
DeleteFunc: jm.enqueueController,
|
||||
},
|
||||
@@ -449,6 +445,15 @@ func filterPods(pods []api.Pod, phase api.PodPhase) int {
|
||||
return result
|
||||
}
|
||||
|
||||
func isJobFinished(j *experimental.Job) bool {
|
||||
for _, c := range j.Status.Conditions {
|
||||
if c.Type == experimental.JobComplete && c.Status == api.ConditionTrue {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// byCreationTimestamp sorts a list by creation timestamp, using their names as a tie breaker.
|
||||
type byCreationTimestamp []experimental.Job
|
||||
|
||||
|
||||
Reference in New Issue
Block a user