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

cdeppisch pushed a commit to branch release-2.3.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/release-2.3.x by this push:
     new 1c40a392f fix(#4922): Fix flaky TestHealthTrait
1c40a392f is described below

commit 1c40a392f508cda8fa7f295fe3ba1f90043f4d4d
Author: Christoph Deppisch <cdeppi...@redhat.com>
AuthorDate: Wed Apr 10 10:46:49 2024 +0200

    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 7e1cd608c..31221cff7 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(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))

Reply via email to