pbacsko commented on code in PR #918:
URL: https://github.com/apache/yunikorn-k8shim/pull/918#discussion_r1799471439


##########
pkg/cache/context_test.go:
##########
@@ -2004,20 +1923,11 @@ func TestInitializeState(t *testing.T) {
        assert.Equal(t, *pc.PreemptionPolicy, policy, "wrong preemption policy")
        assert.Equal(t, pc.Annotations[constants.AnnotationAllowPreemption], 
constants.True, "wrong allow-preemption value")
 
-       // verify occupied / capacity on node
-       capacity, occupied, ok := 
context.schedulerCache.SnapshotResources(nodeName1)
-       assert.Assert(t, ok, "Unable to retrieve node resources")
-       expectedCapacity := common.ParseResource("4", "10G")
-       assert.Equal(t, expectedCapacity.Resources["vcore"].Value, 
capacity.Resources["vcore"].Value, "wrong capacity vcore")
-       assert.Equal(t, expectedCapacity.Resources["memory"].Value, 
capacity.Resources["memory"].Value, "wrong capacity memory")
-       expectedOccupied := common.ParseResource("1500m", "2G")
-       assert.Equal(t, expectedOccupied.Resources["vcore"].Value, 
occupied.Resources["vcore"].Value, "wrong occupied vcore")
-       assert.Equal(t, expectedOccupied.Resources["memory"].Value, 
occupied.Resources["memory"].Value, "wrong occupied memory")
-

Review Comment:
   I re-added the assertions regarding "capacity". The occupied stuff is no 
longer calculated in the shim, so that's a goner.
   
   Could you be a bit more specific about `foreignRunning` / `foreignPending`? 
I made no such update to the test.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to