chenyulin0719 commented on code in PR #841:
URL: https://github.com/apache/yunikorn-k8shim/pull/841#discussion_r1603746520


##########
pkg/plugin/predicates/predicate_manager_test.go:
##########
@@ -115,17 +115,17 @@ func TestPreemptionPredicates(t *testing.T) {
        node.AddPod(victims[3])
 
        // all but 1 existing pod should need removing
-       index, ok := predicateManager.PreemptionPredicates(pod, node, victims, 
1)
-       assert.Check(t, ok, "check failed")
+       index := predicateManager.PreemptionPredicates(pod, node, victims, 1)
+       assert.Check(t, index != -1, "check failed")
        assert.Equal(t, index, 2, "wrong index")

Review Comment:
   Ditto
   
   -> assert.Equal(t, index, 2, "wrong  victim index")



-- 
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