mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Fix data race in namespace
Code review changes
This commit is contained in:
parent
87e5d4e4de
commit
d8a752ff72
@ -39,8 +39,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func extinguish(f *framework.Framework, totalNS int, maxAllowedAfterDel int, maxSeconds int) {
|
func extinguish(f *framework.Framework, totalNS int, maxAllowedAfterDel int, maxSeconds int) {
|
||||||
var err error
|
|
||||||
|
|
||||||
ginkgo.By("Creating testing namespaces")
|
ginkgo.By("Creating testing namespaces")
|
||||||
wg := &sync.WaitGroup{}
|
wg := &sync.WaitGroup{}
|
||||||
wg.Add(totalNS)
|
wg.Add(totalNS)
|
||||||
@ -49,7 +47,7 @@ func extinguish(f *framework.Framework, totalNS int, maxAllowedAfterDel int, max
|
|||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
defer ginkgo.GinkgoRecover()
|
defer ginkgo.GinkgoRecover()
|
||||||
ns := fmt.Sprintf("nslifetest-%v", n)
|
ns := fmt.Sprintf("nslifetest-%v", n)
|
||||||
_, err = f.CreateNamespace(ns, nil)
|
_, err := f.CreateNamespace(ns, nil)
|
||||||
framework.ExpectNoError(err, "failed to create namespace: %s", ns)
|
framework.ExpectNoError(err, "failed to create namespace: %s", ns)
|
||||||
}(n)
|
}(n)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user