@@ -25,7 +25,6 @@ import (
2525 "github.com/onsi/gomega"
2626 batchv1 "k8s.io/api/batch/v1"
2727 corev1 "k8s.io/api/core/v1"
28- apimeta "k8s.io/apimachinery/pkg/api/meta"
2928 "k8s.io/apimachinery/pkg/fields"
3029 "k8s.io/apimachinery/pkg/labels"
3130 "k8s.io/utils/ptr"
@@ -256,13 +255,10 @@ var _ = ginkgo.Describe("Hotswap for Topology Aware Scheduling", ginkgo.Ordered,
256255 nodeToRestore = node .DeepCopy ()
257256 gomega .Expect (k8sClient .Delete (ctx , node )).To (gomega .Succeed ())
258257 })
259- wl := & kueue.Workload {}
260- ginkgo .By ("Check that the workload is evicted" , func () {
261- gomega .Eventually (func (g gomega.Gomega ) {
262- g .Expect (k8sClient .Get (ctx , wlKey , wl )).To (gomega .Succeed ())
263- g .Expect (wl .Status .Admission ).To (gomega .BeNil ())
264- g .Expect (apimeta .IsStatusConditionTrue (wl .Status .Conditions , kueue .WorkloadEvicted )).To (gomega .BeTrue ())
265- }, util .LongTimeout , util .Interval ).Should (gomega .Succeed ())
258+ ginkgo .By ("Check that workload is rescheduled to a different rack" , func () {
259+ expectWorkloadTopologyAssignment (ctx , k8sClient , wlKey , numPods , []string {
260+ "kind-worker3" , "kind-worker4" ,
261+ })
266262 })
267263 })
268264 })
0 commit comments