manirajv06 commented on code in PR #905:
URL: https://github.com/apache/yunikorn-core/pull/905#discussion_r1663996516
##########
pkg/webservice/handlers_test.go:
##########
@@ -1106,74 +1108,17 @@ func TestGetPartitionQueuesHandler(t *testing.T) {
err = json.Unmarshal(resp.outputBytes, &partitionQueuesDao)
assert.NilError(t, err, unmarshalError)
// assert root fields
- assert.Equal(t, partitionQueuesDao.QueueName, configs.RootQueue)
- assert.Equal(t, partitionQueuesDao.Status, objects.Active.String())
- assert.Equal(t, partitionQueuesDao.Partition, configs.DefaultPartition)
- assert.Assert(t, partitionQueuesDao.PendingResource == nil)
- assert.Assert(t, partitionQueuesDao.MaxResource == nil)
- assert.Assert(t, partitionQueuesDao.GuaranteedResource == nil)
- assert.Assert(t, partitionQueuesDao.AllocatedResource == nil)
- assert.Assert(t, partitionQueuesDao.PreemptingResource == nil)
- assert.Assert(t, partitionQueuesDao.HeadRoom == nil)
- assert.Assert(t, !partitionQueuesDao.IsLeaf)
- assert.Assert(t, partitionQueuesDao.IsManaged)
- assert.Equal(t, partitionQueuesDao.Parent, "")
- assert.Assert(t, partitionQueuesDao.AbsUsedCapacity == nil)
- assert.Equal(t, partitionQueuesDao.MaxRunningApps, uint64(0))
- assert.Equal(t, partitionQueuesDao.RunningApps, uint64(0))
- assert.Equal(t, partitionQueuesDao.CurrentPriority, configs.MinPriority)
- assert.Assert(t, partitionQueuesDao.AllocatingAcceptedApps == nil)
- assert.Equal(t, len(partitionQueuesDao.Properties), 1)
- assert.Equal(t,
partitionQueuesDao.Properties[configs.ApplicationSortPolicy],
policies.FifoSortPolicy.String())
- assert.DeepEqual(t, partitionQueuesDao.TemplateInfo, &templateInfo)
+ assertPartitionQueueDaoInfo(t, &partitionQueuesDao, configs.RootQueue,
configs.DefaultPartition, nil, nil, false, true, "", &templateInfo)
Review Comment:
This whole things started with lint warning ( > x lines warnings) as this pr
has touched those places. We need to fix these warnings to get a clean build.
Then analysed the code for further improvements and thats how we landed up here.
--
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]