Skip to content

Commit

Permalink
fix(#4922): Fix flaky TestHealthTrait
Browse files Browse the repository at this point in the history
- Avoid failing assertion on condition status ready=false due to temporary deployment ready condition status
  • Loading branch information
christophd committed Apr 10, 2024
1 parent dbb1bea commit 6033d54
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions e2e/common/traits/health_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 6033d54

Please sign in to comment.