Skip to content

Commit

Permalink
Use GinkgoRecover to avoid panic.
Browse files Browse the repository at this point in the history
  • Loading branch information
Random-Liu committed Jan 12, 2018
1 parent 67a5a26 commit 4d6817d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/e2e_node/resource_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import (
"k8s.io/kubernetes/test/e2e/framework"
"k8s.io/kubernetes/test/e2e_node/perftype"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)

Expand Down Expand Up @@ -373,6 +374,7 @@ func deletePodsSync(f *framework.Framework, pods []*v1.Pod) {
for _, pod := range pods {
wg.Add(1)
go func(pod *v1.Pod) {
defer GinkgoRecover()
defer wg.Done()

err := f.PodClient().Delete(pod.ObjectMeta.Name, metav1.NewDeleteOptions(30))
Expand Down

0 comments on commit 4d6817d

Please sign in to comment.