You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2024/05/06 07:37:35 UTC

(camel-k) branch main updated: fix(e2e): add readiness workaround as expected by Camel framework

This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/main by this push:
     new 0e6eac1d3 fix(e2e): add readiness workaround as expected by Camel framework
0e6eac1d3 is described below

commit 0e6eac1d3199f41ecdf54ec6bcd105a2f9252c7e
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Fri May 3 11:47:24 2024 +0200

    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 7a26bb9f2..b2bc4f5eb 100644
--- a/e2e/common/traits/health_test.go
+++ b/e2e/common/traits/health_test.go
@@ -362,12 +362,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))