8
8
9
9
"github.com/ray-project/kuberay/ray-operator/apis/config/v1alpha1"
10
10
schedulerinterface "github.com/ray-project/kuberay/ray-operator/controllers/ray/batchscheduler/interface"
11
+ "github.com/ray-project/kuberay/ray-operator/controllers/ray/batchscheduler/kai-scheduler"
11
12
"github.com/ray-project/kuberay/ray-operator/controllers/ray/batchscheduler/volcano"
12
13
"github.com/ray-project/kuberay/ray-operator/controllers/ray/batchscheduler/yunikorn"
13
14
)
@@ -16,6 +17,7 @@ func TestGetSchedulerFactory(t *testing.T) {
16
17
DefaultFactory := & schedulerinterface.DefaultBatchSchedulerFactory {}
17
18
VolcanoFactory := & volcano.VolcanoBatchSchedulerFactory {}
18
19
YuniKornFactory := & yunikorn.YuniKornSchedulerFactory {}
20
+ KaiFactory := & kaischeduler.KaiSchedulerFactory {}
19
21
20
22
type args struct {
21
23
rayConfigs v1alpha1.Configuration
@@ -65,6 +67,16 @@ func TestGetSchedulerFactory(t *testing.T) {
65
67
},
66
68
want : reflect .TypeOf (VolcanoFactory ),
67
69
},
70
+ {
71
+ name : "enableBatchScheduler=false, batchScheduler set to kai-scheduler" ,
72
+ args : args {
73
+ rayConfigs : v1alpha1.Configuration {
74
+ EnableBatchScheduler : false ,
75
+ BatchScheduler : kaischeduler .GetPluginName (),
76
+ },
77
+ },
78
+ want : reflect .TypeOf (KaiFactory ),
79
+ },
68
80
{
69
81
name : "enableBatchScheduler not set, batchScheduler set to yunikorn" ,
70
82
args : args {
@@ -83,6 +95,15 @@ func TestGetSchedulerFactory(t *testing.T) {
83
95
},
84
96
want : reflect .TypeOf (VolcanoFactory ),
85
97
},
98
+ {
99
+ name : "enableBatchScheduler not set, batchScheduler set to kai-scheduler" ,
100
+ args : args {
101
+ rayConfigs : v1alpha1.Configuration {
102
+ BatchScheduler : kaischeduler .GetPluginName (),
103
+ },
104
+ },
105
+ want : reflect .TypeOf (KaiFactory ),
106
+ },
86
107
{
87
108
name : "enableBatchScheduler not set, batchScheduler set to unknown value" ,
88
109
args : args {
0 commit comments