e2e stress test: Fix data race on error

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
This commit is contained in:
Gaurav Singh
2020-05-17 20:15:41 -04:00
parent ec0eec68b2
commit 0093265bf0

View File

@@ -181,7 +181,7 @@ func (t *stressTestSuite) DefineTests(driver TestDriver, pattern testpatterns.Te
default: default:
pod := l.pods[podIndex] pod := l.pods[podIndex]
framework.Logf("Pod %v, Iteration %v/%v", podIndex, j, l.testOptions.NumRestarts-1) framework.Logf("Pod %v, Iteration %v/%v", podIndex, j, l.testOptions.NumRestarts-1)
_, err = cs.CoreV1().Pods(pod.Namespace).Create(context.TODO(), pod, metav1.CreateOptions{}) _, err := cs.CoreV1().Pods(pod.Namespace).Create(context.TODO(), pod, metav1.CreateOptions{})
framework.ExpectNoError(err) framework.ExpectNoError(err)
err = e2epod.WaitForPodRunningInNamespace(cs, pod) err = e2epod.WaitForPodRunningInNamespace(cs, pod)