From e44ed431800197175737e59ff9a42be93e4e5c80 Mon Sep 17 00:00:00 2001 From: Per Goncalves da Silva Date: Sat, 25 May 2024 21:12:13 +0200 Subject: [PATCH 1/2] patch flakes Signed-off-by: Per Goncalves da Silva --- pkg/controller/operators/olm/operator_test.go | 2 +- test/e2e/subscription_e2e_test.go | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pkg/controller/operators/olm/operator_test.go b/pkg/controller/operators/olm/operator_test.go index 492cc020ce..8c688326da 100644 --- a/pkg/controller/operators/olm/operator_test.go +++ b/pkg/controller/operators/olm/operator_test.go @@ -4030,7 +4030,7 @@ func TestUpdates(t *testing.T) { csvsToSync = syncCSVs(csvsToSync, deletedCSVs(e.shouldBe)) current = csvsToSync[e.whenIn.name] fmt.Printf("waiting for (when) %s to be %s\n", e.whenIn.name, e.whenIn.phase) - time.Sleep(1 * time.Millisecond) + time.Sleep(1 * time.Second) } // sync the other csvs until they're in the expected status diff --git a/test/e2e/subscription_e2e_test.go b/test/e2e/subscription_e2e_test.go index 165c56a781..2d1746c578 100644 --- a/test/e2e/subscription_e2e_test.go +++ b/test/e2e/subscription_e2e_test.go @@ -2597,14 +2597,20 @@ var _ = Describe("Subscription", func() { err = magicCatalog.UpdateCatalog(context.Background(), provider) Expect(err).To(BeNil()) - By("waiting for the subscription to have v0.3.0 installed with a Package deprecated condition") - sub, err = fetchSubscription(crc, generatedNamespace.GetName(), subName, subscriptionHasCondition( - operatorsv1alpha1.SubscriptionPackageDeprecated, - corev1.ConditionTrue, - "", - "olm.package/test-package: test-package has been deprecated. Please switch to another-package.")) + By("waiting for the subscription to have v0.3.0 installed ") + sub, err = fetchSubscription(crc, generatedNamespace.GetName(), subName, subscriptionHasCurrentCSV("example-operator.v0.3.0")) Expect(err).Should(BeNil()) + By("waiting for the subscription to have v0.3.0 installed with a Package deprecated condition") + sub, err = fetchSubscription(crc, generatedNamespace.GetName(), subName, + subscriptionHasCondition( + operatorsv1alpha1.SubscriptionPackageDeprecated, + corev1.ConditionTrue, + "", + "olm.package/test-package: test-package has been deprecated. Please switch to another-package.", + ), + ) + By("checking for the deprecated conditions") By(`Operator is deprecated at only Package and Channel levels`) packageCondition := sub.Status.GetCondition(operatorsv1alpha1.SubscriptionPackageDeprecated) From dfebb36da93cab0a810cf54b2466e5a33055bc5c Mon Sep 17 00:00:00 2001 From: Per Goncalves da Silva Date: Mon, 27 May 2024 09:56:32 +0200 Subject: [PATCH 2/2] Update test/e2e/subscription_e2e_test.go Co-authored-by: Mikalai Radchuk <509198+m1kola@users.noreply.github.com> --- test/e2e/subscription_e2e_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/subscription_e2e_test.go b/test/e2e/subscription_e2e_test.go index 2d1746c578..a28cb5040e 100644 --- a/test/e2e/subscription_e2e_test.go +++ b/test/e2e/subscription_e2e_test.go @@ -2597,7 +2597,7 @@ var _ = Describe("Subscription", func() { err = magicCatalog.UpdateCatalog(context.Background(), provider) Expect(err).To(BeNil()) - By("waiting for the subscription to have v0.3.0 installed ") + By("waiting for the subscription to have v0.3.0 installed") sub, err = fetchSubscription(crc, generatedNamespace.GetName(), subName, subscriptionHasCurrentCSV("example-operator.v0.3.0")) Expect(err).Should(BeNil())