From 1ba54ed9d59f0615e0c7e25f6905a8cdfb882648 Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Tue, 12 Dec 2023 13:39:44 +0000 Subject: [PATCH] Some more changes --- pkg/collect/run_pod.go | 4 ++-- test/e2e/support-bundle/goldpinger_collector_e2e_test.go | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pkg/collect/run_pod.go b/pkg/collect/run_pod.go index 00eec9965..772af28f4 100644 --- a/pkg/collect/run_pod.go +++ b/pkg/collect/run_pod.go @@ -467,13 +467,13 @@ func deletePod(ctx context.Context, client *kubernetes.Clientset, pod *corev1.Po }) if err != nil { zeroGracePeriod := int64(0) - klog.V(2).Infof("Pod %s forcefully deleted after reaching the maximum wait time of %d seconds due to err=%v", + klog.V(2).Infof("Forcefully deleting pod %s after reaching the maximum wait time of %d seconds due to err=%v", pod.Name, constants.MAX_TIME_TO_WAIT_FOR_POD_DELETION/time.Second, err, ) if err := client.CoreV1().Pods(pod.Namespace).Delete(context.Background(), pod.Name, metav1.DeleteOptions{ GracePeriodSeconds: &zeroGracePeriod, }); err != nil { - klog.Errorf("Failed to wait for pod %s deletion: %v", pod.Name, err) + klog.Errorf("Forced deletion of pod %s failed: %v", pod.Name, err) return } klog.V(2).Infof("Pod %s in %s namespace has been deleted", pod.Name, pod.Namespace) diff --git a/test/e2e/support-bundle/goldpinger_collector_e2e_test.go b/test/e2e/support-bundle/goldpinger_collector_e2e_test.go index a4d2e654d..93cf96a45 100644 --- a/test/e2e/support-bundle/goldpinger_collector_e2e_test.go +++ b/test/e2e/support-bundle/goldpinger_collector_e2e_test.go @@ -67,10 +67,9 @@ func Test_GoldpingerCollector(t *testing.T) { cmd.Stdout = &out cmd.Stderr = &stdErr err = cmd.Run() - t.Logf("Stdout: %s\n", out.String()) - t.Logf("Stderr: %s\n", stdErr.String()) if err != nil { - + t.Logf("Stdout: %s\n", out.String()) + t.Logf("Stderr: %s\n", stdErr.String()) t.Fatal(err) }