FrankYang0529 commented on code in PR #765:
URL: https://github.com/apache/yunikorn-core/pull/765#discussion_r1438806086
##########
pkg/common/configs/config_test.go:
##########
@@ -916,35 +916,35 @@ partitions:
// limit 1 check
limit := conf.Partitions[0].Limits[0]
- if len(limit.Users) != 1 && limit.Users[0] != "user1" &&
len(limit.Groups) != 0 {
+ if len(limit.Users) != 1 || limit.Users[0] != "user1" ||
len(limit.Groups) != 0 {
t.Errorf("failed to load max apps %v", limit)
}
if len(limit.Groups) != 0 {
t.Errorf("group list should be empty and is not: %v", limit)
}
- if limit.MaxApplications != 10 && (len(limit.MaxResources) != 2 &&
limit.MaxResources["memory"] != "10000") {
+ if limit.MaxApplications != 5 || len(limit.MaxResources) != 2 ||
limit.MaxResources["memory"] != "10000" {
Review Comment:
Do we want to add one more condition `limit.MaxResources["vcore"] != "10"`?
##########
pkg/common/configs/config_test.go:
##########
@@ -993,28 +993,28 @@ partitions:
// limit 1 check
limit := conf.Partitions[0].Queues[0].Limits[0]
- if len(limit.Users) != 1 && limit.Users[0] != "user1" &&
len(limit.Groups) != 0 {
+ if len(limit.Users) != 1 || limit.Users[0] != "user1" ||
len(limit.Groups) != 0 {
t.Errorf("user and group list have incorrect entries: %v",
limit)
}
- if limit.MaxApplications != 5 && (len(limit.MaxResources) != 2 &&
limit.MaxResources["memory"] != "10000") {
+ if limit.MaxApplications != 5 || len(limit.MaxResources) != 2 ||
limit.MaxResources["memory"] != "10000" {
Review Comment:
Do we want to add one more condition `limit.MaxResources["vcore"] != "10"`?
--
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]