From 3af1c02455bc6000ae762357ff5eb913c3a93bfd Mon Sep 17 00:00:00 2001 From: Tiger Kaovilai Date: Thu, 30 Apr 2026 14:32:47 -0400 Subject: [PATCH] Increase Fedora VM startup timeout to 20 minutes 30Gi DataVolume cloning can exceed the previous 10-minute hardcoded timeout, causing test flakes where the VM starts seconds after timeout. Add configurable StartupTimeout field to VmBackupRestoreCase and set 20 minutes for the Fedora todolist test. Other tests default to 10m. Closes: https://github.com/openshift/oadp-operator/issues/2183 Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy Signed-off-by: Tiger Kaovilai --- tests/e2e/virt_backup_restore_suite_test.go | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/e2e/virt_backup_restore_suite_test.go b/tests/e2e/virt_backup_restore_suite_test.go index d3cc605ae27..887f6f136f2 100644 --- a/tests/e2e/virt_backup_restore_suite_test.go +++ b/tests/e2e/virt_backup_restore_suite_test.go @@ -75,9 +75,10 @@ func vmPoweredOff(vmnamespace, vmname string) VerificationFunction { type VmBackupRestoreCase struct { BackupRestoreCase - Template string - InitDelay time.Duration - PowerState string + Template string + InitDelay time.Duration + StartupTimeout time.Duration + PowerState string } func runVmBackupAndRestore(brCase VmBackupRestoreCase, updateLastBRcase func(brCase VmBackupRestoreCase), v *lib.VirtOperator) { @@ -98,7 +99,11 @@ func runVmBackupAndRestore(brCase VmBackupRestoreCase, updateLastBRcase func(brC // Wait for VM to start, then give some time for cloud-init to run. // Afterward, run through the standard application verification to make sure // the application itself is working correctly. - err = wait.PollUntilContextTimeout(context.Background(), 10*time.Second, 10*time.Minute, true, func(ctx context.Context) (bool, error) { + startupTimeout := brCase.StartupTimeout + if startupTimeout == 0 { + startupTimeout = 10 * time.Minute + } + err = wait.PollUntilContextTimeout(context.Background(), 10*time.Second, startupTimeout, true, func(ctx context.Context) (bool, error) { status, err := v.GetVmStatus(brCase.Namespace, brCase.Name) return status == "Running", err }) @@ -349,8 +354,9 @@ var _ = ginkgo.Describe("VM backup and restore tests", ginkgo.Ordered, func() { }, nil), ginkgo.Entry("todolist CSI backup and restore, in a Fedora VM", ginkgo.Label("virt"), VmBackupRestoreCase{ - Template: "./sample-applications/virtual-machines/fedora-todolist/fedora-todolist.yaml", - InitDelay: 3 * time.Minute, // For cloud-init + Template: "./sample-applications/virtual-machines/fedora-todolist/fedora-todolist.yaml", + InitDelay: 3 * time.Minute, // For cloud-init + StartupTimeout: 20 * time.Minute, BackupRestoreCase: BackupRestoreCase{ Namespace: "mysql-persistent", Name: "fedora-todolist",