Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(e2e): add readiness workaround as expected by Camel framework #5450

Merged
merged 1 commit into from
May 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions e2e/common/traits/health_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down