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

commit bb7fcfb5fc9479a13f8680d481d627b76c82ffed
Author: Pasquale Congiusti <pasquale.congiu...@gmail.com>
AuthorDate: Thu May 16 16:43:22 2024 +0200

    fix(e2e): strengthen upgrade test
    
    We must identify if a rolled out Pod after an upgrade is turning ready as 
expected. If not we have a possible breaking compatibility change
---
 e2e/install/upgrade/cli_upgrade_test.go |  6 +++++-
 e2e/install/upgrade/olm_upgrade_test.go | 11 +++++++++--
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/e2e/install/upgrade/cli_upgrade_test.go 
b/e2e/install/upgrade/cli_upgrade_test.go
index 90da1cb5a..8f607fa92 100644
--- a/e2e/install/upgrade/cli_upgrade_test.go
+++ b/e2e/install/upgrade/cli_upgrade_test.go
@@ -98,7 +98,11 @@ func TestCLIOperatorUpgrade(t *testing.T) {
                g.Eventually(PlatformVersion(t, ctx, ns), 
TestTimeoutMedium).Should(Equal(defaults.Version))
 
                // Check the Integration hasn't been upgraded
-               g.Consistently(IntegrationVersion(t, ctx, ns, name), 
5*time.Second, 1*time.Second).Should(Equal(version))
+               g.Consistently(IntegrationVersion(t, ctx, ns, name), 
15*time.Second, 3*time.Second).Should(Equal(version))
+               // Make sure that any Pod rollout is completing successfully
+               // otherwise we are probably in front of a non breaking 
compatibility change
+               g.Consistently(IntegrationConditionStatus(t, ctx, ns, name, 
v1.IntegrationConditionReady),
+                       2*time.Minute, 
15*time.Second).Should(Equal(corev1.ConditionTrue))
 
                // Force the Integration upgrade
                g.Expect(Kamel(t, ctx, "rebuild", name, "-n", 
ns).Execute()).To(Succeed())
diff --git a/e2e/install/upgrade/olm_upgrade_test.go 
b/e2e/install/upgrade/olm_upgrade_test.go
index ac8bcf472..7544ce7a8 100644
--- a/e2e/install/upgrade/olm_upgrade_test.go
+++ b/e2e/install/upgrade/olm_upgrade_test.go
@@ -205,6 +205,13 @@ func TestOLMOperatorUpgrade(t *testing.T) {
                        g.Consistently(IntegrationVersion(t, ctx, ns, name), 
5*time.Second, 1*time.Second).
                                Should(ContainSubstring(prevIPVersionPrefix))
 
+                       // Make sure that any Pod rollout is completing 
successfully
+                       // otherwise we are probably in front of a non breaking 
compatibility change
+                       g.Consistently(IntegrationConditionStatus(t, ctx, ns, 
name, v1.IntegrationConditionReady),
+                               2*time.Minute, 
15*time.Second).Should(Equal(corev1.ConditionTrue))
+                       g.Consistently(IntegrationConditionStatus(t, ctx, ns, 
kbindName, v1.IntegrationConditionReady),
+                               2*time.Minute, 
15*time.Second).Should(Equal(corev1.ConditionTrue))
+
                        // Rebuild the Integration
                        g.Expect(Kamel(t, ctx, "rebuild", "--all", "-n", 
ns).Execute()).To(Succeed())
                        if prevCSVVersion.Version.String() >= "2" {
@@ -244,9 +251,9 @@ func TestOLMOperatorUpgrade(t *testing.T) {
                        // Check the Integration runs correctly
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, 
name)).Should(Equal(corev1.PodRunning))
                        g.Eventually(IntegrationPodPhase(t, ctx, ns, 
kbindName)).Should(Equal(corev1.PodRunning))
-                       g.Eventually(IntegrationConditionStatus(t, ctx, ns, 
name, v1.IntegrationConditionReady), TestTimeoutLong).
+                       g.Eventually(IntegrationConditionStatus(t, ctx, ns, 
name, v1.IntegrationConditionReady), TestTimeoutMedium).
                                Should(Equal(corev1.ConditionTrue))
-                       g.Eventually(IntegrationConditionStatus(t, ctx, ns, 
kbindName, v1.IntegrationConditionReady), TestTimeoutLong).
+                       g.Eventually(IntegrationConditionStatus(t, ctx, ns, 
kbindName, v1.IntegrationConditionReady), TestTimeoutMedium).
                                Should(Equal(corev1.ConditionTrue))
 
                        // Clean up

Reply via email to