Skip to content

Commit 3d7d06e

Browse files
committed
Bump timeout to account for slow GPU operations
Signed-off-by: Davanum Srinivas <[email protected]>
1 parent e516e00 commit 3d7d06e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

test/e2e/framework/pod/pod_client.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,13 @@ func (c *PodClient) WaitForFinish(ctx context.Context, name string, timeout time
308308

309309
// WaitForErrorEventOrSuccess waits for pod to succeed or an error event for that pod.
310310
func (c *PodClient) WaitForErrorEventOrSuccess(ctx context.Context, pod *v1.Pod) (*v1.Event, error) {
311+
return c.WaitForErrorEventOrSuccessWithTimeout(ctx, pod, framework.PodStartTimeout)
312+
}
313+
314+
// WaitForErrorEventOrSuccessWithTimeout waits for pod to succeed or an error event for that pod for a specified time
315+
func (c *PodClient) WaitForErrorEventOrSuccessWithTimeout(ctx context.Context, pod *v1.Pod, timeout time.Duration) (*v1.Event, error) {
311316
var ev *v1.Event
312-
err := wait.PollUntilContextTimeout(ctx, framework.Poll, framework.PodStartTimeout, false, func(ctx context.Context) (bool, error) {
317+
err := wait.PollUntilContextTimeout(ctx, framework.Poll, timeout, false, func(ctx context.Context) (bool, error) {
313318
evnts, err := c.f.ClientSet.CoreV1().Events(pod.Namespace).Search(scheme.Scheme, pod)
314319
if err != nil {
315320
return false, fmt.Errorf("error in listing events: %w", err)

test/e2e/node/gpu.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func createAndValidatePod(ctx context.Context, f *framework.Framework, podClient
154154
pod = podClient.Create(ctx, pod)
155155

156156
ginkgo.By("Watching for error events or started pod")
157-
ev, err := podClient.WaitForErrorEventOrSuccess(ctx, pod)
157+
ev, err := podClient.WaitForErrorEventOrSuccessWithTimeout(ctx, pod, framework.PodStartTimeout*3)
158158
framework.ExpectNoError(err)
159159
gomega.Expect(ev).To(gomega.BeNil())
160160

0 commit comments

Comments
 (0)