don't force delete pods on e2e tests

This commit is contained in:
Antonio Ojea 2024-04-23 09:57:30 +00:00
parent e6e60900f0
commit 06457a5219

View File

@ -882,10 +882,10 @@ func (config *NetworkingTestConfig) createNetProxyPods(ctx context.Context, podN
// DeleteNetProxyPod deletes the first endpoint pod and waits for it being removed.
func (config *NetworkingTestConfig) DeleteNetProxyPod(ctx context.Context) {
pod := config.EndpointPods[0]
framework.ExpectNoError(config.getPodClient().Delete(ctx, pod.Name, *metav1.NewDeleteOptions(0)))
framework.ExpectNoError(config.getPodClient().Delete(ctx, pod.Name, metav1.DeleteOptions{}))
config.EndpointPods = config.EndpointPods[1:]
// wait for pod being deleted.
err := e2epod.WaitForPodNotFoundInNamespace(ctx, config.f.ClientSet, pod.Name, config.Namespace, wait.ForeverTestTimeout)
err := e2epod.WaitForPodNotFoundInNamespace(ctx, config.f.ClientSet, pod.Name, config.Namespace, config.f.Timeouts.PodDelete)
if err != nil {
framework.Failf("Failed to delete %s pod: %v", pod.Name, err)
}