From 5a221c5f09a7d09baa092adc97efc37d531cd96e Mon Sep 17 00:00:00 2001 From: Jianrong Zhang Date: Fri, 18 Oct 2024 11:17:50 -0400 Subject: [PATCH] [issue-438] Knative trigger validation in E2E test randomly fails (#555) --- test/e2e/helpers.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/e2e/helpers.go b/test/e2e/helpers.go index c614e1d67..1f1334e29 100644 --- a/test/e2e/helpers.go +++ b/test/e2e/helpers.go @@ -265,7 +265,10 @@ func verifyTrigger(triggers []operatorapi.SonataFlowPlatformTriggerRef, namePref GinkgoWriter.Println("Triggers from platform status:", triggers) for _, ref := range triggers { if strings.HasPrefix(ref.Name, namePrefix) && ref.Namespace == ns { - return verifyTriggerData(ref.Name, ns, path, broker) + EventuallyWithOffset(1, func() error { + return verifyTriggerData(ref.Name, ns, path, broker) + }, 2*time.Minute, 5).Should(Succeed()) + return nil } } return fmt.Errorf("failed to find trigger to verify with prefix: %v, namespace: %v", namePrefix, ns)