@@ -274,7 +274,7 @@ var _ = ginkgo.Describe("Preemption", func() {
274274 normalWl := utiltestingapi .MakeWorkload ("normal-wl" , ns .Name ).
275275 Queue (kueue .LocalQueueName (q .Name )).
276276 Priority (0 ).
277- Request (corev1 .ResourceCPU , "2 " ).
277+ Request (corev1 .ResourceCPU , "4 " ).
278278 Obj ()
279279
280280 normalWl .Spec .PriorityClassRef = & kueue.PriorityClassRef {
@@ -289,8 +289,8 @@ var _ = ginkgo.Describe("Preemption", func() {
289289 ginkgo .By ("Creating a suspended workload WITHOUT priority class" )
290290 suspendedWl := utiltestingapi .MakeWorkload ("suspended-wl" , ns .Name ).
291291 Queue (kueue .LocalQueueName (q .Name )).
292- Request (corev1 .ResourceCPU , "2 " ).
293- Active (false ). // Suspended
292+ Request (corev1 .ResourceCPU , "4 " ).
293+ Active (false ).
294294 Obj ()
295295 util .MustCreate (ctx , k8sClient , suspendedWl )
296296
@@ -317,11 +317,19 @@ var _ = ginkgo.Describe("Preemption", func() {
317317 g .Expect (* wl .Spec .Priority ).To (gomega .Equal (highPriority ))
318318 }, util .Timeout , util .Interval ).Should (gomega .Succeed ())
319319
320+ ginkgo .By ("Unsuspending the workload (set Active=true)" )
321+ gomega .Eventually (func (g gomega.Gomega ) {
322+ wl := & kueue.Workload {}
323+ g .Expect (k8sClient .Get (ctx , client .ObjectKeyFromObject (suspendedWl ), wl )).To (gomega .Succeed ())
324+ wl .Spec .Active = ptr .To (true )
325+ g .Expect (k8sClient .Update (ctx , wl )).To (gomega .Succeed ())
326+ }, util .Timeout , util .Interval ).Should (gomega .Succeed ())
327+
320328 ginkgo .By ("Verifying the normal priority workload gets preempted" )
321329 util .ExpectWorkloadsToBePreempted (ctx , k8sClient , normalWl )
322330 util .FinishEvictionForWorkloads (ctx , k8sClient , normalWl )
323331
324- ginkgo .By ("Verifying the high-priority suspended workload gets admitted" )
332+ ginkgo .By ("Verifying the high-priority workload gets admitted" )
325333 util .ExpectWorkloadsToHaveQuotaReservation (ctx , k8sClient , cq .Name , suspendedWl )
326334
327335 ginkgo .By ("Verifying the normal priority workload is now pending" )
0 commit comments