lixmgl commented on code in PR #473:
URL: https://github.com/apache/yunikorn-core/pull/473#discussion_r1046324251
##########
pkg/scheduler/objects/queue_test.go:
##########
@@ -1334,6 +1334,17 @@ func TestGetPartitionQueueDAOInfo(t *testing.T) {
root.guaranteedResource = getResource(t)
assert.DeepEqual(t, root.GetMaxResource().DAOMap(),
root.GetMaxResource().DAOMap())
assert.DeepEqual(t, root.GetGuaranteedResource().DAOMap(),
root.GetGuaranteedResource().DAOMap())
+
+ // test allocatingAcceptedApps
+ root.allocatingAcceptedApps = getAllocatingAcceptedApps()
+ assert.Assert(t, reflect.DeepEqual(len(root.allocatingAcceptedApps),
len(root.GetPartitionQueueDAOInfo().AllocatingAcceptedApps)))
Review Comment:
Good point.
I updated to check len(root.allocatingAcceptedApps) and
len(root.GetPartitionQueueDAOInfo().AllocatingAcceptedApps) separately since
they could be different.
I also checked root.GetPartitionQueueDAOInfo().AllocatingAcceptedApps
element value, in this test it should be appID1 since it's true, we don't
append appID2 since it's false.
##########
pkg/scheduler/objects/queue_test.go:
##########
@@ -1334,6 +1334,17 @@ func TestGetPartitionQueueDAOInfo(t *testing.T) {
root.guaranteedResource = getResource(t)
assert.DeepEqual(t, root.GetMaxResource().DAOMap(),
root.GetMaxResource().DAOMap())
assert.DeepEqual(t, root.GetGuaranteedResource().DAOMap(),
root.GetGuaranteedResource().DAOMap())
+
+ // test allocatingAcceptedApps
+ root.allocatingAcceptedApps = getAllocatingAcceptedApps()
+ assert.Assert(t, reflect.DeepEqual(len(root.allocatingAcceptedApps),
len(root.GetPartitionQueueDAOInfo().AllocatingAcceptedApps)))
Review Comment:
Good point.
I updated to check len(root.allocatingAcceptedApps) and
len(root.GetPartitionQueueDAOInfo().AllocatingAcceptedApps) separately since
they could be different.
I also checked root.GetPartitionQueueDAOInfo().AllocatingAcceptedApps
element value, in this test it should be appID1 since it's true, we don't
append appID2 to AllocatingAcceptedApps since it's false.
--
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]