You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ts...@apache.org on 2022/10/24 08:30:49 UTC
[camel-k] 02/03: fix(e2e): stabilise TestNativeIntegrations
This is an automated email from the ASF dual-hosted git repository.
tsato pushed a commit to branch release-1.8.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 6f63c75df4481efba17e4e8467b164222c99b1b6
Author: Tadayoshi Sato <sa...@gmail.com>
AuthorDate: Tue Oct 18 14:44:58 2022 +0900
fix(e2e): stabilise TestNativeIntegrations
---
e2e/native/native_test.go | 7 ++++---
e2e/support/test_support.go | 14 ++++++++++----
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/e2e/native/native_test.go b/e2e/native/native_test.go
index a5a871ecb..6cff8eabe 100644
--- a/e2e/native/native_test.go
+++ b/e2e/native/native_test.go
@@ -42,8 +42,9 @@ var (
func TestNativeIntegrations(t *testing.T) {
WithNewTestNamespace(t, func(ns string) {
Expect(Kamel("install", "-n", ns,
- "--build-timeout", "15m0s",
- "--operator-resources", "limits.memory=4Gi",
+ "--build-timeout", "40m0s",
+ "--operator-resources", "limits.memory=4.5Gi",
+ "--maven-cli-option", "-Dquarkus.native.native-image-xmx=3g",
).Execute()).To(Succeed())
Eventually(PlatformPhase(ns), TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))
@@ -107,7 +108,7 @@ func TestNativeIntegrations(t *testing.T) {
// Check the native Kit is ready
Eventually(Kits(ns, withNativeLayout, KitWithPhase(v1.IntegrationKitPhaseReady)),
- TestTimeoutLong).Should(HaveLen(1))
+ TestTimeoutVeryLong).Should(HaveLen(1))
nativeKit := Kits(ns, withNativeLayout, KitWithPhase(v1.IntegrationKitPhaseReady))()[0]
// Check the Integration uses the native Kit
diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go
index 67afbc8d7..e4bd01442 100644
--- a/e2e/support/test_support.go
+++ b/e2e/support/test_support.go
@@ -28,7 +28,6 @@ import (
"context"
"encoding/json"
"fmt"
- "github.com/stretchr/testify/assert"
"io"
"io/ioutil"
"os"
@@ -38,6 +37,8 @@ import (
"testing"
"time"
+ "github.com/stretchr/testify/assert"
+
"github.com/apache/camel-k/pkg/platform"
"github.com/google/uuid"
"github.com/onsi/gomega"
@@ -88,6 +89,9 @@ var TestTimeoutShort = 1 * time.Minute
var TestTimeoutMedium = 5 * time.Minute
var TestTimeoutLong = 10 * time.Minute
+// TestTimeoutVeryLong should be used only for testing native builds.
+var TestTimeoutVeryLong = 40 * time.Minute
+
var TestContext context.Context
var testClient client.Client
@@ -1590,11 +1594,13 @@ func CreateTimerKamelet(ns string, name string) func() error {
return CreateKamelet(ns, name, flow, props, nil)
}
-func BindKameletTo(ns string, name string, annotations map[string]string, from corev1.ObjectReference, to corev1.ObjectReference, sourceProperties map[string]string, sinkProperties map[string]string) func() error {
+func BindKameletTo(ns, name string, annotations map[string]string, from, to corev1.ObjectReference,
+ sourceProperties, sinkProperties map[string]string) func() error {
return BindKameletToWithErrorHandler(ns, name, annotations, from, to, sourceProperties, sinkProperties, nil)
}
-func BindKameletToWithErrorHandler(ns string, name string, annotations map[string]string, from corev1.ObjectReference, to corev1.ObjectReference, sourceProperties map[string]string, sinkProperties map[string]string, errorHandler map[string]interface{}) func() error {
+func BindKameletToWithErrorHandler(ns, name string, annotations map[string]string, from, to corev1.ObjectReference,
+ sourceProperties, sinkProperties map[string]string, errorHandler map[string]interface{}) func() error {
return func() error {
kb := v1alpha1.NewKameletBinding(ns, name)
kb.Annotations = annotations
@@ -1691,7 +1697,7 @@ func WithGlobalOperatorNamespace(t *testing.T, test func(string)) {
if ocp {
// global operators are always installed in the openshift-operators namespace
InvokeUserTestCode(t, "openshift-operators", test)
- }else {
+ } else {
// create new namespace for the global operator
WithNewTestNamespace(t, test)
}