brandboat commented on code in PR #763:
URL: https://github.com/apache/yunikorn-core/pull/763#discussion_r1439053201


##########
pkg/common/configs/config_test.go:
##########
@@ -907,15 +907,15 @@ partitions:
        conf, err := CreateConfig(data)
        assert.NilError(t, err, "partition user parsing should not have failed")
        // gone through validation: 1 top level queues
-       if len(conf.Partitions[0].Queues) != 1 {
-               t.Errorf("failed to load queue %v", conf)
+       if len(conf.Partitions[0].Queues) != 1 || 
len(conf.Partitions[0].Queues[0].Limits) != 3 {
+               t.Errorf("partition limits not correctly applied to root queue 
%v", conf)
        }
-       if len(conf.Partitions[0].Limits) != 3 {
-               t.Errorf("partition users linked not correctly loaded  %v", 
conf)
+       if len(conf.Partitions[0].Limits) != 0 {
+               t.Errorf("partition limits not wiped out %v", conf)
        }
 
        // limit 1 check
-       limit := conf.Partitions[0].Limits[0]
+       limit := conf.Partitions[0].Queues[0].Limits[0]

Review Comment:
   > or could we accept the root-level limits is equal with partition-level 
limits? that may be a good way, as the caller can call either root-level limits 
or partition-level limits.
   
   I've considered this before, and at that time, I thought making 
configuration changes was a relatively simple approach without the need to 
modify manager.go. Anyway, this is a completely different approach. I will 
submit another PR and let the community decide.



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