pbacsko commented on code in PR #438:
URL: https://github.com/apache/yunikorn-k8shim/pull/438#discussion_r911843064


##########
test/e2e/framework/helpers/k8s/k8s_utils.go:
##########
@@ -442,6 +442,27 @@ func (k *KubeCtl) isPodNotInNS(podName string, namespace 
string) wait.ConditionF
        }
 }
 
+// return a condition function that indicates whether the given pod has 
received the expected event
+func (k *KubeCtl) isPodEventTriggered(namespace string, podName string, 
expectedReason string) wait.ConditionFunc {
+       return func() (bool, error) {
+               events, err := 
k.clientSet.CoreV1().Events(namespace).List(context.TODO(), 
metav1.ListOptions{})
+               if err == nil {

Review Comment:
   Nit: revert condition, if `err != nil` and return `false, err`, so you don't 
need the extra identation.



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