From 9d0f6adbaba32eefb2a24be2bba1f1fb5896185d Mon Sep 17 00:00:00 2001 From: Chai Bot Date: Mon, 19 Oct 2026 16:45:39 +0000 Subject: [PATCH] Fix BSL count race condition in multi-BSL e2e test The BSL count assertion at line 673 uses a synchronous gomega.Expect that can fail when the operator has not finished reconciling after a DPA patch. Replace with gomega.Eventually to poll until all 3 BSLs are present, with a 3-minute timeout and 5-second polling interval. This fixes flaky failures in periodic-ci-openshift-oadp-operator-oadp-1.4-4.18-e2e-test-aws-periodic. --- tests/e2e/backup_restore_suite_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/e2e/backup_restore_suite_test.go b/tests/e2e/backup_restore_suite_test.go index 280b5beff4b..caed71753ca 100755 --- a/tests/e2e/backup_restore_suite_test.go +++ b/tests/e2e/backup_restore_suite_test.go @@ -668,9 +668,16 @@ var _ = ginkgo.Describe("Multiple BSL with custom CA cert tests", ginkgo.Ordered // Check BSL status - only the default BSL needs to be available log.Print("Checking if default BSL is available") + gomega.Eventually(func() int { + bsls, err := dpaCR.ListBSLs() + if err != nil { + return -1 + } + return len(bsls.Items) + }, time.Minute*3, time.Second*5).Should(gomega.Equal(3), "Should have 3 BSLs configured") + bsls, err := dpaCR.ListBSLs() gomega.Expect(err).NotTo(gomega.HaveOccurred()) - gomega.Expect(len(bsls.Items)).To(gomega.Equal(3), "Should have 3 BSLs configured") // Find the default BSL var defaultBSL *velero.BackupStorageLocation