pbacsko commented on code in PR #759:
URL: https://github.com/apache/yunikorn-k8shim/pull/759#discussion_r1444493726
##########
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:
1. Just use int64 for timeout so you don't need to cast
2. 300 millisec is too low in an e2e test, increase it to 1 second
Also fix existing methods with these changes. `WaitforQueueToAppear()`
actually polls in every 300 usec (!), which is obviously a typo. Don't put such
a load on Yunikorn. The other method is `WaitForAppStateTransition()`.
--
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]