Skip to content

Commit e1e0fe3

Browse files
committed
Test
1 parent 96371a0 commit e1e0fe3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pkg/workload/workload.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,12 +1030,14 @@ func mergePatchStatus(ctx context.Context, c client.Client, wl *kueue.Workload,
10301030
patchOptions = append(patchOptions, clientutil.WithRetryOnConflict())
10311031
}
10321032
return clientutil.PatchStatus(ctx, c, wl, func() (bool, error) {
1033+
time.Sleep(time.Second)
10331034
return update(wl)
10341035
}, patchOptions...)
10351036
}
10361037

10371038
func applyPatchStatus(ctx context.Context, c client.Client, wl *kueue.Workload, owner client.FieldOwner, update UpdateFunc) error {
10381039
if updated, err := update(wl); err != nil || !updated {
1040+
time.Sleep(time.Second)
10391041
return err
10401042
}
10411043
return c.Status().Patch(ctx, wl, client.Apply, owner, client.ForceOwnership)

test/e2e/customconfigs/waitforpodsready_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ var _ = ginkgo.Describe("WaitForPodsReady with tiny Timeout and no RecoveryTimeo
132132
util.ExpectObjectToBeDeleted(ctx, k8sClient, metricsReaderClusterRoleBinding, true)
133133
})
134134

135-
ginkgo.It("should evict and requeue workload when pods readiness timeout is surpassed", func() {
135+
ginkgo.FIt("should evict and requeue workload when pods readiness timeout is surpassed", func() {
136136
ginkgo.By("creating a suspended job so its pods never report Ready", func() {
137137
job = testingjob.MakeJob("job-timeout", ns.Name).
138138
Queue(kueue.LocalQueueName(lq.Name)).
@@ -238,7 +238,7 @@ var _ = ginkgo.Describe("WaitForPodsReady with default Timeout and a tiny Recove
238238
cfg.WaitForPodsReady = &configapi.WaitForPodsReady{
239239
Timeout: metav1.Duration{Duration: 5 * time.Minute},
240240
BlockAdmission: ptr.To(true),
241-
RecoveryTimeout: &metav1.Duration{Duration: time.Nanosecond},
241+
RecoveryTimeout: &metav1.Duration{Duration: util.Timeout},
242242
RequeuingStrategy: &configapi.RequeuingStrategy{
243243
Timestamp: ptr.To(configapi.EvictionTimestamp),
244244
BackoffBaseSeconds: ptr.To(int32(1)),

0 commit comments

Comments
 (0)