File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1436,6 +1436,16 @@ func TestQueueSecondPassIfNeeded(t *testing.T) {
14361436 passTime : time .Second ,
14371437 wantReady : sets .New (workload .NewReference ("default" , "second" )),
14381438 },
1439+ "workload no longer needs second pass after first iteration" : {
1440+ workloads : []* kueue.Workload {
1441+ baseWorkloadNeedingSecondPass .DeepCopy (),
1442+ },
1443+ passTime : time .Second ,
1444+ wantReady : sets .New [workload.Reference ](),
1445+
1446+ },
1447+
1448+
14391449 }
14401450 for name , tc := range cases {
14411451 t .Run (name , func (t * testing.T ) {
@@ -1449,6 +1459,13 @@ func TestQueueSecondPassIfNeeded(t *testing.T) {
14491459 for _ , wl := range tc .workloads {
14501460 manager .QueueSecondPassIfNeeded (ctx , wl , 0 )
14511461 }
1462+ if name == "workload no longer needs second pass after first iteration" {
1463+ manager .QueueSecondPassIfNeeded (
1464+ ctx ,
1465+ baseWorkloadNotNeedingSecondPass .DeepCopy (),
1466+ 1 ,
1467+ )
1468+ }
14521469 for _ , wl := range tc .deleted .UnsortedList () {
14531470 manager .secondPassQueue .deleteByKey (wl )
14541471 }
You can’t perform that action at this time.
0 commit comments