You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2022/03/29 14:21:27 UTC
[GitHub] [yunikorn-k8shim] craigcondit commented on a change in pull request #399: [YUNIKORN-1159] Ensure node occupied resources are updated on added pods
craigcondit commented on a change in pull request #399:
URL: https://github.com/apache/yunikorn-k8shim/pull/399#discussion_r837538232
##########
File path: pkg/cache/node_coordinator_test.go
##########
@@ -35,6 +35,48 @@ const (
HostEmpty = ""
)
+func TestAddPod(t *testing.T) {
+ mockedSchedulerAPI := newMockSchedulerAPI()
+ nodes := newSchedulerNodes(mockedSchedulerAPI, NewTestSchedulerCache())
+ host1 := utils.NodeForTest(Host1, "10G", "10")
+ host2 := utils.NodeForTest(Host2, "10G", "10")
+ nodes.addNode(host1)
+ nodes.addNode(host2)
+ coordinator := newNodeResourceCoordinator(nodes)
+
+ // pod is not assigned to any node
+ // this won't trigger an update
+ pod := utils.PodForTest("pod1", "1G", "500m")
+ pod.Status.Phase = v1.PodPending
+ pod.Status.Phase = v1.PodPending
Review comment:
Fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org