File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -519,6 +519,39 @@ func TestCalculatePGMinResources(t *testing.T) {
519519 corev1 .ResourceMemory : resource .MustParse ("65Gi" ),
520520 },
521521 },
522+ "without worker without priorityClass" : {
523+ minMember : 3 ,
524+ job : & kubeflow.MPIJob {
525+ ObjectMeta : metav1.ObjectMeta {
526+ Name : "test" ,
527+ },
528+ Spec : kubeflow.MPIJobSpec {
529+ MPIReplicaSpecs : map [kubeflow.MPIReplicaType ]* kubeflow.ReplicaSpec {
530+ kubeflow .MPIReplicaTypeLauncher : {
531+ Replicas : ptr.To [int32 ](1 ),
532+ Template : corev1.PodTemplateSpec {
533+ Spec : corev1.PodSpec {
534+ Containers : []corev1.Container {
535+ {
536+ Resources : corev1.ResourceRequirements {
537+ Requests : corev1.ResourceList {
538+ corev1 .ResourceCPU : resource .MustParse ("2" ),
539+ corev1 .ResourceMemory : resource .MustParse ("1Gi" ),
540+ },
541+ },
542+ },
543+ },
544+ },
545+ },
546+ },
547+ },
548+ },
549+ },
550+ want : & corev1.ResourceList {
551+ corev1 .ResourceCPU : resource .MustParse ("2" ),
552+ corev1 .ResourceMemory : resource .MustParse ("1Gi" ),
553+ },
554+ },
522555 }
523556 for name , tc := range volcanoTests {
524557 t .Run (name , func (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments