You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2022/07/06 11:24:24 UTC

[GitHub] [yunikorn-k8shim] manirajv06 commented on a diff in pull request #438: [YUNIKORN-1231] Add e2e tests for the entire preemption flow

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


##########
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:
   Yes, but we need to duplicate "return false, nil"..right?



-- 
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: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org