From 6334e15d808bdf48b00a8c8ff074e4bb10ab867d Mon Sep 17 00:00:00 2001 From: Christoph Deppisch Date: Tue, 9 Apr 2024 11:15:45 +0200 Subject: [PATCH] fix(#5326): Fix flaky E2E test - Make sure to wait some time for registry address to be set on IntegrationPlatform status --- e2e/install/kustomize/operator_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/e2e/install/kustomize/operator_test.go b/e2e/install/kustomize/operator_test.go index 20997cf74a..c8d6862413 100644 --- a/e2e/install/kustomize/operator_test.go +++ b/e2e/install/kustomize/operator_test.go @@ -32,6 +32,7 @@ import ( . "github.com/apache/camel-k/v2/e2e/support" testutil "github.com/apache/camel-k/v2/e2e/support/util" + v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1" "github.com/apache/camel-k/v2/pkg/util/kubernetes" . "github.com/onsi/gomega" @@ -75,9 +76,9 @@ func TestOperatorBasic(t *testing.T) { g.Eventually(Platform(t, ctx, ns)).ShouldNot(BeNil()) registry := os.Getenv("KIND_REGISTRY") if registry != "" { - platform := Platform(t, ctx, ns)() - g.Expect(platform.Status.Build.Registry).ShouldNot(BeNil()) - g.Expect(platform.Status.Build.Registry.Address).To(Equal(registry)) + g.Eventually(PlatformHas(t, ctx, ns, func(pl *v1.IntegrationPlatform) bool { + return pl.Status.Build.Registry.Address == registry + }), TestTimeoutShort).Should(BeTrue()) } })