Skip to content

Commit

Permalink
chore(e2e): move memory limit to builder pod
Browse files Browse the repository at this point in the history
  • Loading branch information
squakez committed May 16, 2023
1 parent d52a50f commit 0cdd6a0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion e2e/builder/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type kitOptions struct {

func TestKitMaxBuildLimit(t *testing.T) {
WithNewTestNamespace(t, func(ns string) {
createOperator(ns, "500Mi", "8m0s", "--global", "--force")
createOperator(ns, "8m0s", "--global", "--force")

pl := Platform(ns)()
// set maximum number of running builds
Expand Down
2 changes: 1 addition & 1 deletion e2e/native/native_binding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ func TestNativeBinding(t *testing.T) {
operatorID := "camel-k-native-binding"
Expect(KamelInstallWithIDAndKameletCatalog(operatorID, ns,
"--build-timeout", "90m0s",
"--operator-resources", "limits.memory=6.5Gi",
"--maven-cli-option", "-Dquarkus.native.native-image-xmx=6g",
).Execute()).To(Succeed())
Eventually(PlatformPhase(ns), TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))
Expand All @@ -64,6 +63,7 @@ func TestNativeBinding(t *testing.T) {
"log-sink",
"-p", "source.message="+message,
"--annotation", "trait.camel.apache.org/quarkus.package-type=native",
"--annotation", "trait.camel.apache.org/builder.limit-memory=6.5Gi",
"--name", bindingName,
).Execute()).To(Succeed())

Expand Down
5 changes: 4 additions & 1 deletion e2e/native/native_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ func TestNativeIntegrations(t *testing.T) {
operatorID := "camel-k-quarkus-native"
Expect(KamelInstallWithID(operatorID, ns,
"--build-timeout", "90m0s",
"--operator-resources", "limits.memory=6.5Gi",
"--maven-cli-option", "-Dquarkus.native.native-image-xmx=6g",
).Execute()).To(Succeed())
Eventually(PlatformPhase(ns), TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))
Expand All @@ -47,6 +46,7 @@ func TestNativeIntegrations(t *testing.T) {
name := "unsupported-js"
Expect(KamelRunWithID(operatorID, ns, "files/JavaScript.js", "--name", name,
"-t", "quarkus.package-type=native",
"-t", "builder.limit-memory=6.5Gi",
).Execute()).To(Succeed())

Eventually(IntegrationPhase(ns, name)).Should(Equal(v1.IntegrationPhaseError))
Expand All @@ -61,6 +61,7 @@ func TestNativeIntegrations(t *testing.T) {
name := "xml-native"
Expect(KamelRunWithID(operatorID, ns, "files/Xml.xml", "--name", name,
"-t", "quarkus.package-type=native",
"-t", "builder.limit-memory=6.5Gi",
).Execute()).To(Succeed())

Eventually(IntegrationPodPhase(ns, name), TestTimeoutVeryLong).Should(Equal(corev1.PodRunning))
Expand All @@ -82,6 +83,7 @@ func TestNativeIntegrations(t *testing.T) {
Expect(KamelRunWithID(operatorID, ns, "files/yaml.yaml", "--name", name,
"-t", "quarkus.package-type=fast-jar",
"-t", "quarkus.package-type=native",
"-t", "builder.limit-memory=6.5Gi",
).Execute()).To(Succeed())

// Check that two Kits are created with distinct layout
Expand Down Expand Up @@ -133,6 +135,7 @@ func TestNativeIntegrations(t *testing.T) {
name := "yaml-native-2"
Expect(KamelRunWithID(operatorID, ns, "files/yaml2.yaml", "--name", name,
"-t", "quarkus.package-type=native",
"-t", "builder.limit-memory=6.5Gi",
).Execute()).To(Succeed())

// This one should run quickly as it suppose to reuse an IntegrationKit
Expand Down
6 changes: 5 additions & 1 deletion e2e/native/native_with_sources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ func TestNativeHighMemoryIntegrations(t *testing.T) {
operatorID := "camel-k-quarkus-high-memory-native"
Expect(KamelInstallWithID(operatorID, ns,
"--build-timeout", "90m0s",
"--operator-resources", "limits.memory=9.5Gi",
"--maven-cli-option", "-Dquarkus.native.native-image-xmx=9g",
).Execute()).To(Succeed())
Eventually(PlatformPhase(ns), TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))
Expand All @@ -61,6 +60,7 @@ func TestNativeHighMemoryIntegrations(t *testing.T) {
name := "java-native"
Expect(KamelRunWithID(operatorID, ns, "files/Java.java", "--name", name,
"-t", "quarkus.package-type=native",
"-t", "builder.limit-memory=9.5Gi",
).Execute()).To(Succeed())

Eventually(IntegrationPodPhase(ns, name), TestTimeoutVeryLong).Should(Equal(corev1.PodRunning))
Expand All @@ -74,6 +74,7 @@ func TestNativeHighMemoryIntegrations(t *testing.T) {
name := "java-native-clone"
Expect(KamelRunWithID(operatorID, ns, "files/Java.java", "--name", name,
"-t", "quarkus.package-type=native",
"-t", "builder.limit-memory=9.5Gi",
).Execute()).To(Succeed())

// This one should run quickly as it suppose to reuse an IntegrationKit
Expand All @@ -90,6 +91,7 @@ func TestNativeHighMemoryIntegrations(t *testing.T) {
name := "java-native-2"
Expect(KamelRunWithID(operatorID, ns, "files/Java2.java", "--name", name,
"-t", "quarkus.package-type=native",
"-t", "builder.limit-memory=9.5Gi",
).Execute()).To(Succeed())

Eventually(IntegrationPodPhase(ns, name), TestTimeoutVeryLong).Should(Equal(corev1.PodRunning))
Expand All @@ -109,6 +111,7 @@ func TestNativeHighMemoryIntegrations(t *testing.T) {
name := "groovy-native"
Expect(KamelRunWithID(operatorID, ns, "files/Groovy.groovy", "--name", name,
"-t", "quarkus.package-type=native",
"-t", "builder.limit-memory=9.5Gi",
).Execute()).To(Succeed())

Eventually(IntegrationPodPhase(ns, name), TestTimeoutVeryLong).Should(Equal(corev1.PodRunning))
Expand All @@ -127,6 +130,7 @@ func TestNativeHighMemoryIntegrations(t *testing.T) {
name := "kotlin-native"
Expect(KamelRunWithID(operatorID, ns, "files/Kotlin.kts", "--name", name,
"-t", "quarkus.package-type=native",
"-t", "builder.limit-memory=9.5Gi",
).Execute()).To(Succeed())

Eventually(IntegrationPodPhase(ns, name), TestTimeoutVeryLong).Should(Equal(corev1.PodRunning))
Expand Down

0 comments on commit 0cdd6a0

Please sign in to comment.