diff --git a/test/e2e/utils/utils.go b/test/e2e/utils/utils.go index d1c19775f..50b52a815 100644 --- a/test/e2e/utils/utils.go +++ b/test/e2e/utils/utils.go @@ -31,13 +31,11 @@ import ( // if all expected replicas are available. func WaitForModelServingReady(t *testing.T, ctx context.Context, kthenaClient *clientset.Clientset, namespace, name string) { t.Log("Waiting for ModelServing to be ready...") - timeoutCtx, cancel := context.WithTimeout(ctx, 5*time.Minute) - defer cancel() - err := wait.PollUntilContextTimeout(timeoutCtx, 5*time.Second, 5*time.Minute, true, func(ctx context.Context) (bool, error) { + err := wait.PollUntilContextTimeout(ctx, 5*time.Second, 5*time.Minute, true, func(ctx context.Context) (bool, error) { ms, err := kthenaClient.WorkloadV1alpha1().ModelServings(namespace).Get(ctx, name, metav1.GetOptions{}) if err != nil { t.Logf("Error getting ModelServing %s, retrying: %v", name, err) - return false, err + return false, nil } // Check if all replicas are available expectedReplicas := int32(1)