This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch k17 in repository https://gitbox.apache.org/repos/asf/camel.git
commit 52f2cc14c9d6bbd84f37cfeed229775a47730303 Author: Claus Ibsen <[email protected]> AuthorDate: Tue Nov 4 10:58:04 2025 +0100 CAMEL-22650: Fix tests to run on java 17 with the k8s run jbang command. --- .../dsl/jbang/core/commands/kubernetes/KubernetesRunTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/test/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesRunTest.java b/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/test/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesRunTest.java index 8cd779bd2e4a..b01fb78b6337 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/test/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesRunTest.java +++ b/dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/test/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesRunTest.java @@ -70,7 +70,7 @@ class KubernetesRunTest extends KubernetesBaseTest { @MethodSource("runtimeProvider") public void shouldHandleMissingSourceFile(RuntimeType rt) throws Exception { KubernetesRun command = createCommand(List.of("mickey-mouse.groovy"), - "--disable-auto=true", "--output=yaml", "--runtime=" + rt.runtime()); + "--disable-auto=true", "--output=yaml", "--runtime=" + rt.runtime(), "--java-version=17"); int exit = command.doCall(); Assertions.assertEquals(1, exit); @@ -84,7 +84,7 @@ class KubernetesRunTest extends KubernetesBaseTest { "--gav=examples:route:1.0.0", "--runtime=quarkus", "--name=my-route-props", "--disable-auto=true", "--image-registry=quay.io", "--image-group=camel-test", "--output=yaml", "--property=a=b", "--property=c=d", "--property=src/test/resources/my-route-props1.properties", - "--property=file:src/test/resources/my-route-props2.properties"); + "--property=file:src/test/resources/my-route-props2.properties", "--java-version=17"); int exit = command.doCall(); Assertions.assertEquals(0, exit); @@ -106,7 +106,7 @@ class KubernetesRunTest extends KubernetesBaseTest { KubernetesRun command = createCommand(List.of("classpath:route.yaml"), "--disable-auto=true", "--image-registry=quay.io", "--image-group=camel-test", "--output=yaml", "--trait", "container.image-pull-policy=IfNotPresent", - "--runtime=" + rt.runtime()); + "--runtime=" + rt.runtime(), "--java-version=17"); int exit = command.doCall(); Assertions.assertEquals(0, exit); @@ -153,7 +153,7 @@ class KubernetesRunTest extends KubernetesBaseTest { @MethodSource("runtimeProvider") public void shouldHandleUnsupportedOutputFormat(RuntimeType rt) throws Exception { KubernetesRun command = createCommand(List.of("classpath:route.yaml"), - "--disable-auto=true", "--output=wrong", "--runtime=" + rt.runtime()); + "--disable-auto=true", "--output=wrong", "--runtime=" + rt.runtime(), "--java-version=17"); Assertions.assertEquals(1, command.doCall()); Assertions.assertTrue(printer.getOutput().endsWith("ERROR: Unsupported output format 'wrong' (supported: yaml, json)")); @@ -165,7 +165,7 @@ class KubernetesRunTest extends KubernetesBaseTest { KubernetesRun command = createCommand(List.of("classpath:route.yaml"), "--disable-auto=true", "--image-registry=quay.io", "--image-group=camel-test", "--output=yaml", "--namespace", "custom", - "--runtime=" + rt.runtime()); + "--runtime=" + rt.runtime(), "--java-version=17"); int exit = command.doCall(); Assertions.assertEquals(0, exit);
