Skip to content

Commit 9b7144b

Browse files
committed
test: fix nfs mount test failure using slow mount check
1 parent affe496 commit 9b7144b

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

test/e2e/testsuites/dynamically_provisioned_cmd_volume_tester.go

+3-7
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,9 @@ func (t *DynamicallyProvisionedCmdVolumeTest) Run(ctx context.Context, client cl
5050
tpod.Create(ctx)
5151
defer tpod.Cleanup(ctx)
5252
ginkgo.By("checking that the pods command exits with no error")
53-
if pod.WinServerVer == "windows-2022" {
54-
if err := e2epod.WaitForPodSuccessInNamespaceTimeout(ctx, tpod.client, tpod.pod.Name, tpod.namespace.Name, 15*time.Minute); err != nil {
55-
ginkgo.By(fmt.Sprintf("hit error(%v) in first run, give another try", err))
56-
}
57-
tpod.WaitForSuccess(ctx)
58-
} else {
59-
tpod.WaitForSuccess(ctx)
53+
if err := e2epod.WaitForPodSuccessInNamespaceTimeout(ctx, tpod.client, tpod.pod.Name, tpod.namespace.Name, 15*time.Minute); err != nil {
54+
ginkgo.By(fmt.Sprintf("hit error(%v) in first run, give another try", err))
6055
}
56+
tpod.WaitForSuccess(ctx)
6157
}
6258
}

test/e2e/testsuites/testsuites.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ func (t *TestDeployment) WaitForPodReady(ctx context.Context) {
470470
// always get first pod as there should only be one
471471
pod := pods.Items[0]
472472
t.podName = pod.Name
473-
err = e2epod.WaitForPodRunningInNamespace(ctx, t.client, &pod)
473+
err = e2epod.WaitForPodRunningInNamespaceSlow(ctx, t.client, pod.Name, t.namespace.Name)
474474
framework.ExpectNoError(err)
475475
}
476476

@@ -605,7 +605,7 @@ func (t *TestStatefulset) WaitForPodReady(ctx context.Context) {
605605
// always get first pod as there should only be one
606606
pod := statefulSetPods.Items[0]
607607
t.podName = pod.Name
608-
err = e2epod.WaitForPodRunningInNamespace(ctx, t.client, &pod)
608+
err = e2epod.WaitForPodRunningInNamespaceSlow(ctx, t.client, pod.Name, t.namespace.Name)
609609
framework.ExpectNoError(err)
610610
}
611611

@@ -712,7 +712,7 @@ func (t *TestPod) WaitForSuccess(ctx context.Context) {
712712
}
713713

714714
func (t *TestPod) WaitForRunning(ctx context.Context) {
715-
err := e2epod.WaitForPodRunningInNamespace(ctx, t.client, t.pod)
715+
err := e2epod.WaitForPodRunningInNamespaceSlow(ctx, t.client, t.pod.Name, t.namespace.Name)
716716
framework.ExpectNoError(err)
717717
}
718718

0 commit comments

Comments
 (0)