Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the use of derecated PodDeleteTimeout const #109977

Merged
merged 1 commit into from May 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/e2e/network/netpol/network_legacy.go
Expand Up @@ -776,15 +776,15 @@ var _ = common.SIGDescribe("NetworkPolicyLegacy [LinuxOnly]", func() {
framework.ExpectNoError(err, "Error creating Network Policy %v: %v", policy.ObjectMeta.Name, err)

testCanConnect(f, f.Namespace, "client-a", service, clientAAllowedPort)
e2epod.WaitForPodNotFoundInNamespace(f.ClientSet, "client-a", f.Namespace.Name, framework.PodDeleteTimeout)
e2epod.WaitForPodNotFoundInNamespace(f.ClientSet, "client-a", f.Namespace.Name, f.Timeouts.PodDelete)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default value of f.Timeouts.PodDelete is 5 minutes as the same as framework.PodDeleteTimeout.
This looks fine for me.

BTW will we remove framework.PodDeleteTimeout?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW will we remove framework.PodDeleteTimeout?

IIUC we could remove technically after migrating is done, though I cannot give an answer as I'm fairly new here, maybe @johnSchnake has some thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your explanation, I see that.
Current change seems good for me then.

/test pull-kubernetes-e2e-gce-storage-snapshot
/lgtm

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/test pull-kubernetes-e2e-gce-storage-snapshot

framework.ExpectNoError(err, "Expected pod to be not found.")

testCannotConnect(f, f.Namespace, "client-b", service, clientAAllowedPort)
e2epod.WaitForPodNotFoundInNamespace(f.ClientSet, "client-b", f.Namespace.Name, framework.PodDeleteTimeout)
e2epod.WaitForPodNotFoundInNamespace(f.ClientSet, "client-b", f.Namespace.Name, f.Timeouts.PodDelete)
framework.ExpectNoError(err, "Expected pod to be not found.")

testCannotConnect(f, f.Namespace, "client-a", service, clientANotAllowedPort)
e2epod.WaitForPodNotFoundInNamespace(f.ClientSet, "client-a", f.Namespace.Name, framework.PodDeleteTimeout)
e2epod.WaitForPodNotFoundInNamespace(f.ClientSet, "client-a", f.Namespace.Name, f.Timeouts.PodDelete)
framework.ExpectNoError(err, "Expected pod to be not found.")

const (
Expand Down Expand Up @@ -823,7 +823,7 @@ var _ = common.SIGDescribe("NetworkPolicyLegacy [LinuxOnly]", func() {
defer cleanupNetworkPolicy(f, policy)

testCannotConnect(f, f.Namespace, "client-b", service, clientBNotAllowedPort)
e2epod.WaitForPodNotFoundInNamespace(f.ClientSet, "client-b", f.Namespace.Name, framework.PodDeleteTimeout)
e2epod.WaitForPodNotFoundInNamespace(f.ClientSet, "client-b", f.Namespace.Name, f.Timeouts.PodDelete)
framework.ExpectNoError(err, "Expected pod to be not found.")

testCannotConnect(f, f.Namespace, "client-a", service, clientBNotAllowedPort)
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/storage/pd.go
Expand Up @@ -196,7 +196,7 @@ var _ = utils.SIGDescribe("Pod Disks [Feature:StorageProvider]", func() {
ginkgo.By("deleting host0Pod") // delete this pod before creating next pod
framework.ExpectNoError(podClient.Delete(context.TODO(), host0Pod.Name, podDelOpt), "Failed to delete host0Pod")
framework.Logf("deleted host0Pod %q", host0Pod.Name)
e2epod.WaitForPodToDisappear(cs, host0Pod.Namespace, host0Pod.Name, labels.Everything(), framework.Poll, framework.PodDeleteTimeout)
e2epod.WaitForPodToDisappear(cs, host0Pod.Namespace, host0Pod.Name, labels.Everything(), framework.Poll, f.Timeouts.PodDelete)
framework.Logf("deleted host0Pod %q disappeared", host0Pod.Name)
}

Expand Down