Skip to content

Commit 9f63988

Browse files
Mohit VinchooMohit Vinchoo
authored andcommitted
Add basic unit test with feature flag off
1 parent 7e724e9 commit 9f63988

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

pkg/scheduler/actions/preempt/preempt_test.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,20 @@ func TestPreempt(t *testing.T) {
314314
}
315315
})
316316
}
317+
actions = []framework.Action{New()}
318+
for i, test := range tests {
319+
test.Plugins = plugins
320+
test.PriClass = []*schedulingv1.PriorityClass{highPrio, lowPrio}
321+
t.Run(test.Name, func(t *testing.T) {
322+
test.RegisterSession(tiers, []conf.Configuration{{Name: actions[0].Name(),
323+
Arguments: map[string]interface{}{EnableStrictGangPreemptionKey: false}}})
324+
defer test.Close()
325+
test.Run(actions)
326+
if err := test.CheckAll(i); err != nil {
327+
t.Fatal(err)
328+
}
329+
})
330+
}
317331
}
318332

319333
func TestTopologyAwarePreempt(t *testing.T) {

0 commit comments

Comments
 (0)