From ead79e2ff8a53e87a2f6eb1f1a1a7919d372c27a Mon Sep 17 00:00:00 2001 From: Pasquale Congiusti Date: Fri, 3 May 2024 11:47:24 +0200 Subject: [PATCH] fix(e2e): add readiness workaround as expected by Camel framework * moved back the check to correctly expect constantly the readiness to be False * added the properties as expected by Camel Closes #5351 --- e2e/common/traits/health_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/e2e/common/traits/health_test.go b/e2e/common/traits/health_test.go index 31221cff73..1844870da6 100644 --- a/e2e/common/traits/health_test.go +++ b/e2e/common/traits/health_test.go @@ -358,12 +358,14 @@ func TestHealthTrait(t *testing.T) { t.Run("Readiness condition with never ready route", func(t *testing.T) { name := RandomizedSuffixName("never-ready") - g.Expect(KamelRunWithID(t, ctx, operatorID, ns, "files/NeverReady.java", "--name", name, "-t", "health.enabled=true").Execute()).To(Succeed()) + g.Expect(KamelRunWithID(t, ctx, operatorID, ns, "files/NeverReady.java", "--name", name, "-t", "health.enabled=true", + // TODO remove these workaround properties when https://issues.apache.org/jira/browse/CAMEL-20244 is fixed + "-p", "camel.route-controller.unhealthyOnRestarting=true", + "-p", "camel.route-controller.unhealthyOnExhausted=true", + ).Execute()).To(Succeed()) 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(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))