Skip to content

Commit

Permalink
Fix race condition in DynamicallyProvisionedDeletePodTest
Browse files Browse the repository at this point in the history
Waif for pod to be actually deleted before checking if the replacement pod is running
  • Loading branch information
dkoshkin committed Feb 7, 2019
1 parent c05802a commit 9826837
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/e2e/testsuites/testsuites.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,13 @@ func (t *TestDeployment) DeletePodAndWait() {
}
return
}
framework.Logf("Waiting for pod %q in namespace %q to be fully deleted", t.podName, t.namespace.Name)
err = framework.WaitForPodNoLongerRunningInNamespace(t.client, t.podName, t.namespace.Name)
if err != nil {
if !apierrs.IsNotFound(err) {
framework.ExpectNoError(fmt.Errorf("pod %q error waiting for delete: %v", t.podName, err))
}
}
}

func (t *TestDeployment) Cleanup() {
Expand Down

0 comments on commit 9826837

Please sign in to comment.