You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2021/09/09 09:53:10 UTC

[camel-k] 31/37: fix(e2e): Increase build timeout for native tests

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

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

commit d6500f737c575acd723925a94f27d2bd21ec38cb
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Fri Sep 3 11:28:26 2021 +0200

    fix(e2e): Increase build timeout for native tests
---
 e2e/builder/build_test.go | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/e2e/builder/build_test.go b/e2e/builder/build_test.go
index 8419950..53ba598 100644
--- a/e2e/builder/build_test.go
+++ b/e2e/builder/build_test.go
@@ -23,6 +23,7 @@ package builder
 
 import (
 	"testing"
+	"time"
 
 	. "github.com/onsi/gomega"
 
@@ -36,7 +37,7 @@ type kitOptions struct {
 }
 
 func TestKitTimerToLogFullBuild(t *testing.T) {
-	doKitFullBuild(t, "timer-to-log", kitOptions{
+	doKitFullBuild(t, "timer-to-log", "5m0s", TestTimeoutLong, kitOptions{
 		dependencies: []string{
 			"camel:timer", "camel:log",
 		},
@@ -44,7 +45,7 @@ func TestKitTimerToLogFullBuild(t *testing.T) {
 }
 
 func TestKitKnativeFullBuild(t *testing.T) {
-	doKitFullBuild(t, "knative", kitOptions{
+	doKitFullBuild(t, "knative", "5m0s", TestTimeoutLong, kitOptions{
 		dependencies: []string{
 			"camel:knative",
 		},
@@ -52,7 +53,7 @@ func TestKitKnativeFullBuild(t *testing.T) {
 }
 
 func TestKitTimerToLogFullNativeBuild(t *testing.T) {
-	doKitFullBuild(t, "timer-to-log", kitOptions{
+	doKitFullBuild(t, "timer-to-log", "15m0s", 2*TestTimeoutLong, kitOptions{
 		dependencies: []string{
 			"camel:timer", "camel:log",
 		},
@@ -62,9 +63,9 @@ func TestKitTimerToLogFullNativeBuild(t *testing.T) {
 	})
 }
 
-func doKitFullBuild(t *testing.T, name string, options kitOptions) {
+func doKitFullBuild(t *testing.T, name string, buildTimeout string, testTimeout time.Duration, options kitOptions) {
 	WithNewTestNamespace(t, func(ns string) {
-		Expect(Kamel("install", "-n", ns).Execute()).To(Succeed())
+		Expect(Kamel("install", "-n", ns, "--build-timeout", buildTimeout).Execute()).To(Succeed())
 		buildKitArgs := []string{"kit", "create", name, "-n", ns}
 		for _, dependency := range options.dependencies {
 			buildKitArgs = append(buildKitArgs, "-d", dependency)
@@ -74,7 +75,7 @@ func doKitFullBuild(t *testing.T, name string, options kitOptions) {
 		}
 		Expect(Kamel(buildKitArgs...).Execute()).To(Succeed())
 		Eventually(Build(ns, name)).ShouldNot(BeNil())
-		Eventually(BuildPhase(ns, name), TestTimeoutMedium).Should(Equal(v1.BuildPhaseSucceeded))
-		Eventually(KitPhase(ns, name), TestTimeoutMedium).Should(Equal(v1.IntegrationKitPhaseReady))
+		Eventually(BuildPhase(ns, name), testTimeout).Should(Equal(v1.BuildPhaseSucceeded))
+		Eventually(KitPhase(ns, name), testTimeout).Should(Equal(v1.IntegrationKitPhaseReady))
 	})
 }