Skip to content

Commit 9756a64

Browse files
committed
fix: move to a new way updating an extended resource
1 parent ce377ef commit 9756a64

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

test/e2e/scheduling/preemption.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,11 +320,7 @@ var _ = SIGDescribe("SchedulerPreemption", framework.WithSerial(), func() {
320320
// Create pods in the cluster.
321321
for i, node := range nodeList.Items {
322322
// Update each node to advertise 3 available extended resources
323-
nodeCopy := node.DeepCopy()
324-
nodeCopy.Status.Capacity[testExtendedResource] = resource.MustParse("10")
325-
nodeCopy.Status.Allocatable[testExtendedResource] = resource.MustParse("10")
326-
err := patchNode(ctx, cs, &node, nodeCopy)
327-
framework.ExpectNoError(err)
323+
e2enode.AddExtendedResource(ctx, cs, node.Name, testExtendedResource, resource.MustParse("10"))
328324

329325
// Create 10 low priority pods on each node, which will use up 10/10 of the node's resources.
330326
for j := 0; j < 10; j++ {

0 commit comments

Comments
 (0)