@@ -2714,6 +2714,48 @@ func TestReconciler(t *testing.T) {
27142714 },
27152715 },
27162716 },
2717+ "shouldn't update workload when priority class no changes" : {
2718+ job : * baseJobWrapper .
2719+ Clone ().
2720+ Suspend (true ).
2721+ PriorityClass (basePCWrapper .Name ).
2722+ UID ("test-uid" ).
2723+ Obj (),
2724+ wantJob : * baseJobWrapper .
2725+ Clone ().
2726+ PriorityClass (basePCWrapper .Name ).
2727+ UID ("test-uid" ).
2728+ Obj (),
2729+ priorityClasses : []client.Object {
2730+ basePCWrapper .Obj (), baseWPCWrapper .Obj (),
2731+ },
2732+ workloads : []kueue.Workload {
2733+ * utiltesting .MakeWorkload ("job" , "ns" ).
2734+ Finalizers (kueue .ResourceInUseFinalizerName ).
2735+ PodSets (* utiltesting .MakePodSet (kueue .DefaultPodSetName , 10 ).PriorityClass (basePCWrapper .Name ).Request (corev1 .ResourceCPU , "1" ).Obj ()).
2736+ Queue ("foo" ).
2737+ Priority (basePCWrapper .Value ).
2738+ PriorityClassSource (constants .PodPriorityClassSource ).
2739+ PriorityClass (basePCWrapper .Name ).
2740+ Labels (map [string ]string {
2741+ controllerconsts .JobUIDLabel : "test-uid" ,
2742+ }).
2743+ Obj (),
2744+ },
2745+ wantWorkloads : []kueue.Workload {
2746+ * utiltesting .MakeWorkload ("job" , "ns" ).
2747+ Finalizers (kueue .ResourceInUseFinalizerName ).
2748+ PodSets (* utiltesting .MakePodSet (kueue .DefaultPodSetName , 10 ).PriorityClass (basePCWrapper .Name ).Request (corev1 .ResourceCPU , "1" ).Obj ()).
2749+ Queue ("foo" ).
2750+ Priority (basePCWrapper .Value ).
2751+ PriorityClassSource (constants .PodPriorityClassSource ).
2752+ PriorityClass (basePCWrapper .Name ).
2753+ Labels (map [string ]string {
2754+ controllerconsts .JobUIDLabel : "test-uid" ,
2755+ }).
2756+ Obj (),
2757+ },
2758+ },
27172759 "the workload without uid label is created when job's uid is longer than 63 characters" : {
27182760 job : * baseJobWrapper .
27192761 Clone ().
0 commit comments