yangwwei commented on a change in pull request #369:
URL:
https://github.com/apache/incubator-yunikorn-k8shim/pull/369#discussion_r825492871
##########
File path: test/e2e/framework/helpers/k8s/k8s_utils.go
##########
@@ -112,6 +138,30 @@ func (k *KubeCtl) GetPod(name, namespace string) (*v1.Pod,
error) {
return k.clientSet.CoreV1().Pods(namespace).Get(context.TODO(), name,
metav1.GetOptions{})
}
+func (k *KubeCtl) GetSchedulerPod() (string, error) {
+ podNameList, err :=
k.GetPodNamesFromNS(configmanager.YuniKornTestConfig.YkNamespace)
+ if err != nil {
+ return "", err
+ }
+ for _, podName := range podNameList {
+ if strings.Contains(podName, configmanager.YKScheduler) {
+ return podName, nil
+ }
+ }
+ return "", errors.New("YK scheduler pod not found")
+}
+
+func (k *KubeCtl) KillKubectlProcess() error {
+ cmd := exec.Command("pkill", "-SIGINT", "kubectl")
Review comment:
I am not sure if ginkgo has any mechanism that can be used to share
context between test suites, can you check that? If not, maybe an option is to
use a singleton pattern for the port forward service? What do you think?
--
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]