mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #108976 from ArangoGutierrez/devel/typos/scheduler
Fix typos under pkg/scheduler
This commit is contained in:
commit
317f8afe92
@ -224,8 +224,8 @@ func TestMostAllocatedScoringStrategy(t *testing.T) {
|
|||||||
resources: defaultResources,
|
resources: defaultResources,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// resource with negtive weight is not allowed
|
// resource with negative weight is not allowed
|
||||||
name: "resource with negtive weight",
|
name: "resource with negative weight",
|
||||||
requestedPod: st.MakePod().
|
requestedPod: st.MakePod().
|
||||||
Req(map[v1.ResourceName]string{"cpu": "1000", "memory": "2000"}).
|
Req(map[v1.ResourceName]string{"cpu": "1000", "memory": "2000"}).
|
||||||
Req(map[v1.ResourceName]string{"cpu": "2000", "memory": "3000"}).
|
Req(map[v1.ResourceName]string{"cpu": "2000", "memory": "3000"}).
|
||||||
|
@ -390,7 +390,7 @@ func (b *volumeBinder) AssumePodVolumes(assumedPod *v1.Pod, nodeName string, pod
|
|||||||
b.revertAssumedPVs(newBindings)
|
b.revertAssumedPVs(newBindings)
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
// TODO: can we assume everytime?
|
// TODO: can we assume every time?
|
||||||
if dirty {
|
if dirty {
|
||||||
err = b.pvCache.Assume(newPV)
|
err = b.pvCache.Assume(newPV)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -64,7 +64,7 @@ type FakePostFilterPlugin struct {
|
|||||||
|
|
||||||
func (pl *FakePostFilterPlugin) SelectVictimsOnNode(
|
func (pl *FakePostFilterPlugin) SelectVictimsOnNode(
|
||||||
ctx context.Context, state *framework.CycleState, pod *v1.Pod,
|
ctx context.Context, state *framework.CycleState, pod *v1.Pod,
|
||||||
nodeInfo *framework.NodeInfo, pdbs []*policy.PodDisruptionBudget) (victims []*v1.Pod, numViolatingVictim int, staus *framework.Status) {
|
nodeInfo *framework.NodeInfo, pdbs []*policy.PodDisruptionBudget) (victims []*v1.Pod, numViolatingVictim int, status *framework.Status) {
|
||||||
return append(victims, nodeInfo.Pods[0].Pod), pl.numViolatingVictim, nil
|
return append(victims, nodeInfo.Pods[0].Pod), pl.numViolatingVictim, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1286,7 +1286,7 @@ func TestFilterPlugins(t *testing.T) {
|
|||||||
"TestPlugin": framework.NewStatus(framework.UnschedulableAndUnresolvable, "injected filter status").WithFailedPlugin("TestPlugin"),
|
"TestPlugin": framework.NewStatus(framework.UnschedulableAndUnresolvable, "injected filter status").WithFailedPlugin("TestPlugin"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// followings tests cover multiple-plugins scenarios
|
// following tests cover multiple-plugins scenarios
|
||||||
{
|
{
|
||||||
name: "ErrorAndErrorFilters",
|
name: "ErrorAndErrorFilters",
|
||||||
plugins: []*TestPlugin{
|
plugins: []*TestPlugin{
|
||||||
|
2
pkg/scheduler/internal/cache/cache_test.go
vendored
2
pkg/scheduler/internal/cache/cache_test.go
vendored
@ -929,7 +929,7 @@ func buildNodeInfo(node *v1.Node, pods []*v1.Pod) *framework.NodeInfo {
|
|||||||
// TestNodeOperators tests node operations of cache, including add, update
|
// TestNodeOperators tests node operations of cache, including add, update
|
||||||
// and remove.
|
// and remove.
|
||||||
func TestNodeOperators(t *testing.T) {
|
func TestNodeOperators(t *testing.T) {
|
||||||
// Test datas
|
// Test data
|
||||||
nodeName := "test-node"
|
nodeName := "test-node"
|
||||||
cpu1 := resource.MustParse("1000m")
|
cpu1 := resource.MustParse("1000m")
|
||||||
mem100m := resource.MustParse("100m")
|
mem100m := resource.MustParse("100m")
|
||||||
|
@ -468,7 +468,7 @@ func TestNodeTreeMultiOperations(t *testing.T) {
|
|||||||
removeIndex++
|
removeIndex++
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
t.Errorf("unknow operation: %v", op)
|
t.Errorf("unknown operation: %v", op)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
output, err := nt.list()
|
output, err := nt.list()
|
||||||
|
@ -439,7 +439,7 @@ func TestPriorityQueue_Activate(t *testing.T) {
|
|||||||
name: "pod already in activeQ",
|
name: "pod already in activeQ",
|
||||||
qPodInfoInActiveQ: []*framework.QueuedPodInfo{{PodInfo: highPriNominatedPodInfo}},
|
qPodInfoInActiveQ: []*framework.QueuedPodInfo{{PodInfo: highPriNominatedPodInfo}},
|
||||||
qPodInfoToActivate: &framework.QueuedPodInfo{PodInfo: highPriNominatedPodInfo},
|
qPodInfoToActivate: &framework.QueuedPodInfo{PodInfo: highPriNominatedPodInfo},
|
||||||
want: []*framework.QueuedPodInfo{{PodInfo: highPriNominatedPodInfo}}, // 1 already actived
|
want: []*framework.QueuedPodInfo{{PodInfo: highPriNominatedPodInfo}}, // 1 already active
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "pod not in unschedulablePods/podBackoffQ",
|
name: "pod not in unschedulablePods/podBackoffQ",
|
||||||
@ -2206,7 +2206,7 @@ func TestMoveAllToActiveOrBackoffQueue_PreEnqueueChecks(t *testing.T) {
|
|||||||
}
|
}
|
||||||
queuedPodInfo, ok := obj.(*framework.QueuedPodInfo)
|
queuedPodInfo, ok := obj.(*framework.QueuedPodInfo)
|
||||||
if !ok {
|
if !ok {
|
||||||
t.Fatalf("Fail to covert popped obj (type %T) to *framework.QueuedPodInfo", obj)
|
t.Fatalf("Fail to convert popped obj (type %T) to *framework.QueuedPodInfo", obj)
|
||||||
}
|
}
|
||||||
got = append(got, queuedPodInfo.Pod.Name)
|
got = append(got, queuedPodInfo.Pod.Name)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user