This is an automated email from the ASF dual-hosted git repository.

payang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-k8shim.git


The following commit(s) were added to refs/heads/master by this push:
     new c7d2c7cf [YUNIKORN-2065] Fail logs are not reported correctly in some 
e2e test (#694)
c7d2c7cf is described below

commit c7d2c7cf18652e6bf3ab5d85a5f2131b893ebbc3
Author: Yu-Lin Chen <[email protected]>
AuthorDate: Sun Oct 22 11:43:37 2023 +0800

    [YUNIKORN-2065] Fail logs are not reported correctly in some e2e test (#694)
    
    Closes: #694
    
    Signed-off-by: PoAn Yang <[email protected]>
---
 test/e2e/preemption/preemption_test.go             | 12 +++++-------
 test/e2e/simple_preemptor/simple_preemptor_test.go | 14 +++++++-------
 test/e2e/user_group_limit/user_group_limit_test.go | 11 +++++------
 3 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/test/e2e/preemption/preemption_test.go 
b/test/e2e/preemption/preemption_test.go
index 77fe01f8..a2e65c8c 100644
--- a/test/e2e/preemption/preemption_test.go
+++ b/test/e2e/preemption/preemption_test.go
@@ -126,12 +126,6 @@ var _ = ginkgo.AfterSuite(func() {
        checks, err := yunikorn.GetFailedHealthChecks()
        Ω(err).NotTo(gomega.HaveOccurred())
        Ω(checks).To(gomega.Equal(""), checks)
-
-       testDescription := ginkgo.CurrentSpecReport()
-       if testDescription.Failed() {
-               
tests.LogTestClusterInfoWrapper(testDescription.FailureMessage(), 
[]string{ns.Name})
-               tests.LogYunikornContainer(testDescription.FailureMessage())
-       }
        ginkgo.By("Tearing down namespace: " + ns.Name)
        err = kClient.TearDownNamespace(ns.Name)
        Ω(err).NotTo(gomega.HaveOccurred())
@@ -553,7 +547,11 @@ var _ = ginkgo.Describe("Preemption", func() {
        })
 
        ginkgo.AfterEach(func() {
-
+               testDescription := ginkgo.CurrentSpecReport()
+               if testDescription.Failed() {
+                       
tests.LogTestClusterInfoWrapper(testDescription.FailureMessage(), 
[]string{ns.Name})
+                       
tests.LogYunikornContainer(testDescription.FailureMessage())
+               }
                // Delete all sleep pods
                ginkgo.By("Delete all sleep pods")
                err := kClient.DeletePods(ns.Name)
diff --git a/test/e2e/simple_preemptor/simple_preemptor_test.go 
b/test/e2e/simple_preemptor/simple_preemptor_test.go
index 69fdef39..9c8386f8 100644
--- a/test/e2e/simple_preemptor/simple_preemptor_test.go
+++ b/test/e2e/simple_preemptor/simple_preemptor_test.go
@@ -96,6 +96,8 @@ var _ = ginkgo.BeforeSuite(func() {
                        nodesToTaint = append(nodesToTaint, node.Name)
                }
        }
+       ginkgo.By("Worker1:" + Worker1)
+       ginkgo.By("Worker2:" + Worker2)
 
        ginkgo.By("Tainting some nodes..")
        err = kClient.TaintNodes(nodesToTaint, taintKey, "value", 
v1.TaintEffectNoSchedule)
@@ -132,12 +134,6 @@ var _ = ginkgo.AfterSuite(func() {
        checks, err := yunikorn.GetFailedHealthChecks()
        Ω(err).NotTo(gomega.HaveOccurred())
        Ω(checks).To(gomega.Equal(""), checks)
-
-       testDescription := ginkgo.CurrentSpecReport()
-       if testDescription.Failed() {
-               
tests.LogTestClusterInfoWrapper(testDescription.FailureMessage(), 
[]string{ns.Name})
-               tests.LogYunikornContainer(testDescription.FailureMessage())
-       }
        ginkgo.By("Tearing down namespace: " + ns.Name)
        err = kClient.TearDownNamespace(ns.Name)
        Ω(err).NotTo(gomega.HaveOccurred())
@@ -219,7 +215,11 @@ var _ = ginkgo.Describe("SimplePreemptor", func() {
        })
 
        ginkgo.AfterEach(func() {
-
+               testDescription := ginkgo.CurrentSpecReport()
+               if testDescription.Failed() {
+                       
tests.LogTestClusterInfoWrapper(testDescription.FailureMessage(), 
[]string{ns.Name})
+                       
tests.LogYunikornContainer(testDescription.FailureMessage())
+               }
                // Delete all sleep pods
                ginkgo.By("Delete all sleep pods")
                pods, err := kClient.GetPodNamesFromNS(ns.Name)
diff --git a/test/e2e/user_group_limit/user_group_limit_test.go 
b/test/e2e/user_group_limit/user_group_limit_test.go
index 4651f70f..7803c631 100644
--- a/test/e2e/user_group_limit/user_group_limit_test.go
+++ b/test/e2e/user_group_limit/user_group_limit_test.go
@@ -95,12 +95,6 @@ var _ = ginkgo.AfterSuite(func() {
        checks, err := yunikorn.GetFailedHealthChecks()
        Ω(err).NotTo(gomega.HaveOccurred())
        Ω(checks).To(gomega.Equal(""), checks)
-
-       testDescription := ginkgo.CurrentSpecReport()
-       if testDescription.Failed() {
-               
tests.LogTestClusterInfoWrapper(testDescription.FailureMessage(), 
[]string{ns.Name})
-               tests.LogYunikornContainer(testDescription.FailureMessage())
-       }
        ginkgo.By("Tearing down namespace: " + ns.Name)
        err = kClient.TearDownNamespace(ns.Name)
        Ω(err).NotTo(gomega.HaveOccurred())
@@ -368,6 +362,11 @@ var _ = ginkgo.Describe("UserGroupLimit", func() {
        })
 
        ginkgo.AfterEach(func() {
+               testDescription := ginkgo.CurrentSpecReport()
+               if testDescription.Failed() {
+                       
tests.LogTestClusterInfoWrapper(testDescription.FailureMessage(), 
[]string{ns.Name})
+                       
tests.LogYunikornContainer(testDescription.FailureMessage())
+               }
                // Delete all sleep pods
                ginkgo.By("Delete all sleep pods")
                err := kClient.DeletePods(ns.Name)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to