wilfred-s commented on code in PR #943:
URL: https://github.com/apache/yunikorn-core/pull/943#discussion_r1716254895
##########
pkg/scheduler/objects/queue_test.go:
##########
@@ -1176,10 +1173,11 @@ func TestGetOutstandingOnlyUntracked(t *testing.T) {
alloc, err := resources.NewResourceFromConf(map[string]string{"pods":
"1"})
assert.NilError(t, err, "failed to create basic resource")
var used *resources.Resource
- used, err = resources.NewResourceFromConf(map[string]string{"cpu":
"10", "pods": "10"})
+ usedMap := map[string]string{"cpu": "10", "pods": "10"}
+ used, err = resources.NewResourceFromConf(usedMap)
assert.NilError(t, err, "failed to create basic resource")
var root, queue1 *Queue
- root, err = createRootQueue(nil)
+ root, err = createRootQueue(usedMap)
Review Comment:
We did not edit it. It was left as nil and we did not register nodes. The
root had a max of nil. Because we did not do the hard fit check these test
cases all passed. The root queue was treated as any other queue: no max FitIn
would always pass.
We do the correct thing now. tests should either register nodes or create a
root with a max set to fake the node registrations.
--
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]