chenyulin0719 commented on code in PR #908:
URL: https://github.com/apache/yunikorn-core/pull/908#discussion_r1665848963


##########
pkg/scheduler/objects/allocation_test.go:
##########
@@ -251,7 +251,7 @@ func TestNewAllocFromSI(t *testing.T) {
        endTime := time.Now().Unix()
        assert.Assert(t, alloc.GetAsk().GetCreateTime().Unix() >= startTime, 
"alloc create time is too early")
        assert.Assert(t, alloc.GetAsk().GetCreateTime().Unix() <= endTime, 
"alloc create time is too late")
-       assert.Assert(t, !alloc.GetAsk().IsOriginator(), "ask should not have 
been an originator")
+       assert.Assert(t, !alloc.IsOriginator(), "ask should not have been an 
originator")

Review Comment:
   ditto



##########
pkg/scheduler/objects/allocation_test.go:
##########
@@ -238,7 +238,7 @@ func TestNewAllocFromSI(t *testing.T) {
        assert.Assert(t, alloc.IsPlaceholder(), "ask should have been a 
placeholder")
        assert.Equal(t, alloc.GetTaskGroup(), "testgroup", "TaskGroupName not 
set as expected")
        assert.Equal(t, alloc.GetAsk().GetCreateTime(), time.Unix(past, 0)) 
//nolint:staticcheck
-       assert.Assert(t, alloc.GetAsk().IsOriginator(), "ask should have been 
an originator")
+       assert.Assert(t, alloc.IsOriginator(), "ask should have been an 
originator")

Review Comment:
   "ask should not have been an originator"
   -> 
   "allocation should have been an orignator".
   
   Maybe we can check both allocation & ask's IsOriginator()
   
   Can do the same check for placeholder.



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