From 1d36e70e8553c01840ec4b4602f971a3e7531e19 Mon Sep 17 00:00:00 2001 From: jeverett Date: Thu, 1 Aug 2024 04:53:16 -0400 Subject: [PATCH] fix(KFLUXBUGS-1297): failure for an already successful snapshot (#1281) The rhtap-demo test suite will sometimes fail due to the integration service lagging when marking a snapshot as succeeded. A test expecting the snapshot in a passing state can fail as a result. Signed-off-by: Josh Everett --- tests/konflux-demo/konflux-demo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/konflux-demo/konflux-demo.go b/tests/konflux-demo/konflux-demo.go index 103d9e05a..7aa815c5d 100644 --- a/tests/konflux-demo/konflux-demo.go +++ b/tests/konflux-demo/konflux-demo.go @@ -321,9 +321,9 @@ var _ = framework.KonfluxDemoSuiteDescribe(Label(devEnvTestLabel), func() { When("Integration Test PipelineRun completes successfully", func() { It("should lead to Snapshot CR being marked as passed", func() { - snapshot, err = fw.AsKubeAdmin.IntegrationController.GetSnapshot("", pipelineRun.Name, "", fw.UserNamespace) - Expect(err).ShouldNot(HaveOccurred()) Eventually(func() bool { + snapshot, err = fw.AsKubeAdmin.IntegrationController.GetSnapshot("", pipelineRun.Name, "", fw.UserNamespace) + Expect(err).ShouldNot(HaveOccurred()) return fw.AsKubeAdmin.CommonController.HaveTestsSucceeded(snapshot) }, time.Minute*5, defaultPollingInterval).Should(BeTrue(), fmt.Sprintf("tests have not succeeded for snapshot %s/%s", snapshot.GetNamespace(), snapshot.GetName())) })