Skip to content

Commit d23310a

Browse files
authored
Merge pull request kubernetes#89324 from tanjunchen/remove-invalid-dependency-waitForPod-002
use e2epod.WaitForPodRunningInNamespaceSlow directly
2 parents c3d483b + aa52bfe commit d23310a

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed

test/e2e/framework/framework.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -520,12 +520,6 @@ func (f *Framework) WaitForPodReady(podName string) error {
520520
return e2epod.WaitTimeoutForPodReadyInNamespace(f.ClientSet, podName, f.Namespace.Name, PodStartTimeout)
521521
}
522522

523-
// WaitForPodRunningSlow waits for the pod to run in the namespace.
524-
// It has a longer timeout then WaitForPodRunning (util.slowPodStartTimeout).
525-
func (f *Framework) WaitForPodRunningSlow(podName string) error {
526-
return e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, podName, f.Namespace.Name)
527-
}
528-
529523
// ClientConfig an externally accessible method for reading the kube client config.
530524
func (f *Framework) ClientConfig() *rest.Config {
531525
ret := rest.CopyConfig(f.clientConfig)

test/e2e/network/dns_common.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ func validateDNSResults(f *framework.Framework, pod *v1.Pod, fileNames []string)
584584
framework.Failf("ginkgo.Failed to create pod %s/%s: %v", pod.Namespace, pod.Name, err)
585585
}
586586

587-
framework.ExpectNoError(f.WaitForPodRunningSlow(pod.Name))
587+
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, pod.Name, f.Namespace.Name))
588588

589589
ginkgo.By("retrieving the pod")
590590
pod, err := podClient.Get(context.TODO(), pod.Name, metav1.GetOptions{})
@@ -612,7 +612,7 @@ func validateTargetedProbeOutput(f *framework.Framework, pod *v1.Pod, fileNames
612612
framework.Failf("ginkgo.Failed to create pod %s/%s: %v", pod.Namespace, pod.Name, err)
613613
}
614614

615-
framework.ExpectNoError(f.WaitForPodRunningSlow(pod.Name))
615+
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, pod.Name, f.Namespace.Name))
616616

617617
ginkgo.By("retrieving the pod")
618618
pod, err := podClient.Get(context.TODO(), pod.Name, metav1.GetOptions{})

test/e2e/storage/pd.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ var _ = utils.SIGDescribe("Pod Disks", func() {
148148
fmtPod = testPDPod([]string{diskName}, host0Name, false, 1)
149149
_, err = podClient.Create(context.TODO(), fmtPod, metav1.CreateOptions{})
150150
framework.ExpectNoError(err, "Failed to create fmtPod")
151-
framework.ExpectNoError(f.WaitForPodRunningSlow(fmtPod.Name))
151+
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, fmtPod.Name, f.Namespace.Name))
152152

153153
ginkgo.By("deleting the fmtPod")
154154
framework.ExpectNoError(podClient.Delete(context.TODO(), fmtPod.Name, *metav1.NewDeleteOptions(0)), "Failed to delete fmtPod")
@@ -176,7 +176,7 @@ var _ = utils.SIGDescribe("Pod Disks", func() {
176176
ginkgo.By("creating host0Pod on node0")
177177
_, err = podClient.Create(context.TODO(), host0Pod, metav1.CreateOptions{})
178178
framework.ExpectNoError(err, fmt.Sprintf("Failed to create host0Pod: %v", err))
179-
framework.ExpectNoError(f.WaitForPodRunningSlow(host0Pod.Name))
179+
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, host0Pod.Name, f.Namespace.Name))
180180
framework.Logf("host0Pod: %q, node0: %q", host0Pod.Name, host0Name)
181181

182182
var containerName, testFile, testFileContents string
@@ -200,7 +200,7 @@ var _ = utils.SIGDescribe("Pod Disks", func() {
200200
ginkgo.By("creating host1Pod on node1")
201201
_, err = podClient.Create(context.TODO(), host1Pod, metav1.CreateOptions{})
202202
framework.ExpectNoError(err, "Failed to create host1Pod")
203-
framework.ExpectNoError(f.WaitForPodRunningSlow(host1Pod.Name))
203+
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, host1Pod.Name, f.Namespace.Name))
204204
framework.Logf("host1Pod: %q, node1: %q", host1Pod.Name, host1Name)
205205

206206
if readOnly {
@@ -282,7 +282,7 @@ var _ = utils.SIGDescribe("Pod Disks", func() {
282282
host0Pod = testPDPod(diskNames, host0Name, false /* readOnly */, numContainers)
283283
_, err = podClient.Create(context.TODO(), host0Pod, metav1.CreateOptions{})
284284
framework.ExpectNoError(err, fmt.Sprintf("Failed to create host0Pod: %v", err))
285-
framework.ExpectNoError(f.WaitForPodRunningSlow(host0Pod.Name))
285+
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, host0Pod.Name, f.Namespace.Name))
286286

287287
ginkgo.By(fmt.Sprintf("writing %d file(s) via a container", numPDs))
288288
containerName := "mycontainer"
@@ -385,7 +385,7 @@ var _ = utils.SIGDescribe("Pod Disks", func() {
385385
_, err = podClient.Create(context.TODO(), host0Pod, metav1.CreateOptions{})
386386
framework.ExpectNoError(err, fmt.Sprintf("Failed to create host0Pod: %v", err))
387387
ginkgo.By("waiting for host0Pod to be running")
388-
framework.ExpectNoError(f.WaitForPodRunningSlow(host0Pod.Name))
388+
framework.ExpectNoError(e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, host0Pod.Name, f.Namespace.Name))
389389

390390
ginkgo.By("writing content to host0Pod")
391391
testFile := "/testpd1/tracker"

test/e2e/storage/vsphere/vsphere_stress.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func PerformVolumeLifeCycleInParallel(f *framework.Framework, client clientset.I
149149
framework.ExpectNoError(err)
150150

151151
ginkgo.By(fmt.Sprintf("%v Waiting for the Pod: %v to be in the running state", logPrefix, pod.Name))
152-
err = f.WaitForPodRunningSlow(pod.Name)
152+
err = e2epod.WaitForPodRunningInNamespaceSlow(f.ClientSet, pod.Name, f.Namespace.Name)
153153
framework.ExpectNoError(err)
154154

155155
// Get the copy of the Pod to know the assigned node name.

0 commit comments

Comments
 (0)