From 6033d54eecafbfbe7a1ce4cdbcf962c5697b42ae Mon Sep 17 00:00:00 2001 From: Christoph Deppisch Date: Wed, 10 Apr 2024 10:46:49 +0200 Subject: [PATCH] fix(#4922): Fix flaky TestHealthTrait - Avoid failing assertion on condition status ready=false due to temporary deployment ready condition status --- e2e/common/traits/health_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/e2e/common/traits/health_test.go b/e2e/common/traits/health_test.go index 7e1cd608cf..90f381225a 100644 --- a/e2e/common/traits/health_test.go +++ b/e2e/common/traits/health_test.go @@ -362,6 +362,8 @@ func TestHealthTrait(t *testing.T) { g.Eventually(IntegrationPodPhase(t, ctx, ns, name), TestTimeoutLong).Should(Equal(corev1.PodRunning)) g.Eventually(IntegrationPhase(t, ctx, ns, name), TestTimeoutShort).Should(Equal(v1.IntegrationPhaseRunning)) + // Wait for the integration condition to become ready=false and then check that it remains not ready for some time - fixes some test flakiness + g.Eventually(IntegrationConditionStatus(t, ctx, ns, name, v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(Equal(corev1.ConditionFalse))) g.Consistently(IntegrationConditionStatus(t, ctx, ns, name, v1.IntegrationConditionReady), 1*time.Minute). Should(Equal(corev1.ConditionFalse)) g.Eventually(IntegrationPhase(t, ctx, ns, name), TestTimeoutLong).Should(Equal(v1.IntegrationPhaseError))