@@ -104,11 +104,32 @@ var _ = ginkgo.Describe("JobSet", func() {
104104 replicas int32
105105 wantSliceSize int32
106106 tpuRequests string
107+ unhealthyNodes []string
107108 wantDomains []kueue.TopologyDomainAssignment
108109 wantSliceNodeSelector map [string ][]string
109110 }
110111 ginkgo .DescribeTable ("it should create Slice based on created Workload with" ,
111112 func (tc testCase ) {
113+ for _ , unhealthyNode := range tc .unhealthyNodes {
114+ node := & corev1.Node {}
115+ gomega .Eventually (func (g gomega.Gomega ) {
116+ g .Expect (k8sClient .Get (ctx , client.ObjectKey {Name : unhealthyNode }, node )).To (gomega .Succeed ())
117+ delete (node .Labels , "cloud.google.com/gke-tpu-slice-4x4x4-health" )
118+ g .Expect (k8sClient .Update (ctx , node )).To (gomega .Succeed ())
119+ }, util .Timeout , util .Interval ).Should (gomega .Succeed ())
120+ }
121+ // Revert changes after test
122+ ginkgo .DeferCleanup (func () {
123+ for _ , unhealthyNode := range tc .unhealthyNodes {
124+ node := & corev1.Node {}
125+ gomega .Eventually (func (g gomega.Gomega ) {
126+ g .Expect (k8sClient .Get (ctx , client.ObjectKey {Name : unhealthyNode }, node )).To (gomega .Succeed ())
127+ node .Labels ["cloud.google.com/gke-tpu-slice-4x4x4-health" ] = "true"
128+ g .Expect (k8sClient .Update (ctx , node )).To (gomega .Succeed ())
129+ }, util .Timeout , util .Interval ).Should (gomega .Succeed ())
130+ }
131+ })
132+
112133 jobSet := testingjobsjobset .MakeJobSet ("jobset" , ns .Name ).
113134 Queue (lq .Name ).
114135 ReplicatedJobs (
@@ -297,6 +318,21 @@ var _ = ginkgo.Describe("JobSet", func() {
297318 "cloud.google.com/gke-tpu-slice-4x4x4-id" : {"sb1" },
298319 },
299320 }),
321+ ginkgo .Entry ("TPU topology 4x4x4, TPU topology 4 and parallelism 16 (missed kind-worker node)" , testCase {
322+ tpuTopology : "4x4x4" ,
323+ tpuRequests : "4" ,
324+ parallelism : 16 ,
325+ replicas : 1 ,
326+ unhealthyNodes : []string {"kind-worker" },
327+ wantSliceSize : 16 ,
328+ wantDomains : []kueue.TopologyDomainAssignment {{
329+ Values : []string {"kind-worker2" },
330+ Count : 16 ,
331+ }},
332+ wantSliceNodeSelector : map [string ][]string {
333+ "cloud.google.com/gke-tpu-slice-4x4x4-id" : {"sb2" },
334+ },
335+ }),
300336 ginkgo .Entry ("TPU topology, TPU topology 1 4x4x4 and parallelism 16" , testCase {
301337 tpuTopology : "4x4x4" ,
302338 tpuRequests : "1" ,
0 commit comments