Commit f37d8fd6 authored by Avesh Agarwal's avatar Avesh Agarwal

Fix node e2e (kubelet metrics) by adding GinkgoRecover to a goroutine

to avoid panic
parent a0a07600
......@@ -26,6 +26,7 @@ import (
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/util/wait"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
......@@ -67,8 +68,9 @@ func (c *PodClient) CreateBatch(pods []*api.Pod) []*api.Pod {
for i, pod := range pods {
wg.Add(1)
go func(i int, pod *api.Pod) {
defer wg.Done()
defer GinkgoRecover()
ps[i] = c.CreateSync(pod)
wg.Done()
}(i, pod)
}
wg.Wait()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment