Merge pull request #135610 from soltysh/err_race

test/e2e: explicitly use new err variable inside parallelized code
This commit is contained in:
Kubernetes Prow Robot
2025-12-17 23:28:17 -08:00
committed by GitHub

View File

@@ -252,7 +252,8 @@ var _ = SIGDescribe("Job", func() {
Namespace: pod.Namespace,
},
}
err = f.ClientSet.CoreV1().Pods(pod.Namespace).EvictV1(ctx, evictTarget)
// use new variable explicitly here, to ensure it doesn't escape the scope of goroutines
err := f.ClientSet.CoreV1().Pods(pod.Namespace).EvictV1(ctx, evictTarget)
framework.ExpectNoError(err, "failed to evict the pod: %s/%s", pod.Name, pod.Namespace)
ginkgo.By(fmt.Sprintf("Awaiting for the pod: %s/%s to be deleted", pod.Name, pod.Namespace))