kubernetes-sigs / kueue

Kubernetes-native Job Queueing
https://kueue.sigs.k8s.io
Apache License 2.0
1.39k stars 256 forks source link

TestUpdateClusterQueue brittle test #3066

Closed gabesaba closed 1 month ago

gabesaba commented 1 month ago

What would you like to be cleaned: in queue.manager_test.go, we attempt to create inadmissible workloads, to verify that they are later active when updating a ClusterQueue. Observe that they are never inadmissible, by adding an assertion right after their creation

https://github.com/kubernetes-sigs/kueue/blob/d786072f994668c0240889d93c63f48a620ea6ad/pkg/queue/manager_test.go#L159-L165

// also, manager.DumpInadmissible() will be empty
activeWorkloads := manager.Dump()
wantActiveWorkloads := map[string]sets.String{}
if diff := cmp.Diff(wantActiveWorkloads, activeWorkloads); diff != "" {
  t.Errorf("Unexpected active workloads (-want +got):\n%s", diff)
}

Why is this needed: Test still passes after deletion of this section: https://github.com/kubernetes-sigs/kueue/blob/d786072f994668c0240889d93c63f48a620ea6ad/pkg/queue/manager_test.go#L167-L185

mbobrovskyi commented 1 month ago

/assign