yangwwei commented on a change in pull request #173:
URL:
https://github.com/apache/incubator-yunikorn-core/pull/173#discussion_r445288604
##########
File path: pkg/scheduler/scheduling_queue_test.go
##########
@@ -688,11 +692,295 @@ func TestHeadroom(t *testing.T) {
res, err = resources.NewResourceFromConf(map[string]string{"first":
"10", "second": "2"})
assert.NilError(t, err, "failed to create resource")
headRoom = leaf1.getHeadRoom()
- if !resources.Equals(res, headRoom) {
+ maxHeadRoom = leaf1.getMaxHeadRoom()
+ if !resources.Equals(res, headRoom) || !resources.Equals(res,
maxHeadRoom) {
t.Errorf("leaf1 queue head room not as expected %v, got: %v
(err %v)", res, headRoom, err)
}
headRoom = leaf2.getHeadRoom()
+ maxHeadRoom = leaf2.getMaxHeadRoom()
+ if !resources.Equals(res, headRoom) || !resources.Equals(res,
maxHeadRoom) {
+ t.Errorf("leaf1 queue head room not as expected %v, got: %v
(err %v)", res, headRoom, err)
+ }
+}
+
+func TestMaxHeadroom(t *testing.T) {
+ // create the root: nil test
Review comment:
OK, thanks!
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]