chenyulin0719 commented on code in PR #759:
URL: https://github.com/apache/yunikorn-k8shim/pull/759#discussion_r1445569443
##########
test/e2e/framework/helpers/yunikorn/rest_api_utils.go:
##########
@@ -235,6 +279,10 @@ func (c *RClient) WaitForAppStateTransition(partition
string, queue string, appI
return wait.PollUntilContextTimeout(context.TODO(),
time.Millisecond*300, time.Duration(timeout)*time.Second, false,
c.isAppInDesiredState(partition, queue, appID, state).WithContext())
}
+func (c *RClient) WaitForCompletedAppStateTransition(partition string, appID
string, state string, timeout int) error {
+ return wait.PollUntilContextTimeout(context.TODO(),
time.Millisecond*300, time.Duration(timeout)*time.Second, false,
c.isAppInDesiredCompletedState(partition, appID, state).WithContext())
Review Comment:
Hi @pbacsko,
Just set below functions to 1 sec (5c165af2539460e97e2ecc03979495644188814f)
1. WaitforQueueToAppear
2. WaitForAppStateTransition
3. WaitForCompletedAppStateTransition
There have some polling functions with 100 interval under k8s_utils.go, but
I'm keeping it as is because they are widely used, and I don't want to increase
the time for e2e testing.
For the int64 timeout, I just realized that even we use int64 for timeout,
we still need to cast it to time.Duration because the type of time.Second is
'time.Duration'(alias of int64). We still need to cast timeout to
'time.Duration'. So I just keep it as it was.
--
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]