@@ -241,7 +241,7 @@ func TestRequestedToCapacityRatio(t *testing.T) {
241
241
newPod := buildResourcesPod ("" , test .requested )
242
242
243
243
snapshot := nodeinfosnapshot .NewSnapshot (scheduledPods , nodes )
244
- list , err := priorityFunction (RequestedToCapacityRatioResourceAllocationPriorityDefault ().PriorityMap , nil , nil )( newPod , snapshot , nodes )
244
+ list , err := runMapReducePriority (RequestedToCapacityRatioResourceAllocationPriorityDefault ().PriorityMap , nil , nil , newPod , snapshot , nodes )
245
245
if err != nil {
246
246
t .Errorf ("unexpected error: %v" , err )
247
247
}
@@ -390,7 +390,7 @@ func TestResourceBinPackingSingleExtended(t *testing.T) {
390
390
functionShape , _ := NewFunctionShape ([]FunctionShapePoint {{0 , 0 }, {100 , 10 }})
391
391
resourceToWeightMap := ResourceToWeightMap {v1 .ResourceName ("intel.com/foo" ): 1 }
392
392
prior := RequestedToCapacityRatioResourceAllocationPriority (functionShape , resourceToWeightMap )
393
- list , err := priorityFunction (prior .PriorityMap , nil , nil )( test .pod , snapshot , test .nodes )
393
+ list , err := runMapReducePriority (prior .PriorityMap , nil , nil , test .pod , snapshot , test .nodes )
394
394
if err != nil {
395
395
t .Errorf ("unexpected error: %v" , err )
396
396
}
@@ -615,7 +615,7 @@ func TestResourceBinPackingMultipleExtended(t *testing.T) {
615
615
functionShape , _ := NewFunctionShape ([]FunctionShapePoint {{0 , 0 }, {100 , 10 }})
616
616
resourceToWeightMap := ResourceToWeightMap {v1 .ResourceName ("intel.com/foo" ): 3 , v1 .ResourceName ("intel.com/bar" ): 5 }
617
617
prior := RequestedToCapacityRatioResourceAllocationPriority (functionShape , resourceToWeightMap )
618
- list , err := priorityFunction (prior .PriorityMap , nil , nil )( test .pod , snapshot , test .nodes )
618
+ list , err := runMapReducePriority (prior .PriorityMap , nil , nil , test .pod , snapshot , test .nodes )
619
619
if err != nil {
620
620
t .Errorf ("unexpected error: %v" , err )
621
621
}
0 commit comments