pbacsko commented on code in PR #438:
URL: https://github.com/apache/yunikorn-k8shim/pull/438#discussion_r915757632
##########
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 {
+ eventItems := events.Items
+ for _, event := range eventItems {
+ fmt.Fprintf(ginkgo.GinkgoWriter, "Failed to
delete pod %s - reason is %s\n", event.InvolvedObject.Name, event.Reason)
Review Comment:
This line is unnecessary
--
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]