You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "jvrubel (via GitHub)" <gi...@apache.org> on 2026/02/09 13:03:32 UTC

[PR] Rework camel-jbang-it to support camel-launcher [camel]

jvrubel opened a new pull request, #21362:
URL: https://github.com/apache/camel/pull/21362

   These changes allow customization of the `camel` command in order to support `camel-launcher`. 
   
   There are also differences from the [closed PR](https://github.com/apache/camel/pull/21143) with the same title. This one only contains the rework itself alongside some minor fixes. I also greatly simplified it by removing the property out of the container service and keeping it as a simple system property as @mcarlett suggested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Rework camel-jbang-it to support camel-launcher [camel]

Posted by "mcarlett (via GitHub)" <gi...@apache.org>.
mcarlett commented on code in PR #21362:
URL: https://github.com/apache/camel/pull/21362#discussion_r2797934310


##########
dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/support/JBangTestSupport.java:
##########
@@ -178,13 +182,13 @@ protected void checkCommandOutputs(String command, String contains, int waitForS
 
     protected void checkCommandOutputs(String command, String contains) {
         Assertions.assertThat(execute(command))
-                .as("command camel " + command + " should output " + contains)
+                .as("command  " + MAIN_COMMAND + " " + command + "should output " + contains)

Review Comment:
   does it compile? I cannot find the `MAIN_COMMAND` variable, you should use now `getMainCommand()`, am I wrong?



##########
dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/support/JBangTestSupport.java:
##########
@@ -138,7 +138,11 @@ protected String execute(final String command) {
     }
 
     protected String executeBackground(final String command) {
-        return containerService.executeBackground(command);
+        return containerService.execute(command + " --background");

Review Comment:
   I'm expecting this to be restored on the current version `containerService.executeBackground(command)` or there are specific reasons? thanks



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Rework camel-jbang-it to support camel-launcher [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #21362:
URL: https://github.com/apache/camel/pull/21362#issuecomment-3871585046

   :star2: Thank you for your contribution to the Apache Camel project! :star2: 
   
   :robot: CI automation will test this PR automatically.
   
   :camel: Apache Camel Committers, please review the following items:
   
   * First-time contributors **require MANUAL approval** for the GitHub Actions to run
   
   * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot.
   
   * You can label PRs using `build-all`, `build-dependents`, `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
   
   * Build and test logs are available in the Summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary. 
   
   * :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Rework camel-jbang-it to support camel-launcher [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #21362:
URL: https://github.com/apache/camel/pull/21362


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Rework camel-jbang-it to support camel-launcher [camel]

Posted by "jvrubel (via GitHub)" <gi...@apache.org>.
jvrubel commented on code in PR #21362:
URL: https://github.com/apache/camel/pull/21362#discussion_r2798075867


##########
dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/support/JBangTestSupport.java:
##########
@@ -138,7 +138,11 @@ protected String execute(final String command) {
     }
 
     protected String executeBackground(final String command) {
-        return containerService.executeBackground(command);
+        return containerService.execute(command + " --background");

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Rework camel-jbang-it to support camel-launcher [camel]

Posted by "jvrubel (via GitHub)" <gi...@apache.org>.
jvrubel commented on code in PR #21362:
URL: https://github.com/apache/camel/pull/21362#discussion_r2798083298


##########
dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/support/JBangTestSupport.java:
##########
@@ -178,13 +182,13 @@ protected void checkCommandOutputs(String command, String contains, int waitForS
 
     protected void checkCommandOutputs(String command, String contains) {
         Assertions.assertThat(execute(command))
-                .as("command camel " + command + " should output " + contains)
+                .as("command  " + MAIN_COMMAND + " " + command + "should output " + contains)

Review Comment:
   My bad



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Rework camel-jbang-it to support camel-launcher [camel]

Posted by "jvrubel (via GitHub)" <gi...@apache.org>.
jvrubel commented on code in PR #21362:
URL: https://github.com/apache/camel/pull/21362#discussion_r2797911488


##########
dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/support/JBangTestSupport.java:
##########
@@ -138,7 +140,11 @@ protected String execute(final String command) {
     }
 
     protected String executeBackground(final String command) {
-        return containerService.executeBackground(command);
+        return containerService.executeGenericCommand(MAIN_COMMAND + " " + command + " --background");

Review Comment:
   This was a workaround that I forgot to remove, changed it a few minutes after the initial PR 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Rework camel-jbang-it to support camel-launcher [camel]

Posted by "jvrubel (via GitHub)" <gi...@apache.org>.
jvrubel commented on code in PR #21362:
URL: https://github.com/apache/camel/pull/21362#discussion_r2797916582


##########
dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/support/JBangTestSupport.java:
##########
@@ -63,6 +63,8 @@ public abstract class JBangTestSupport {
 
     private static final String DATA_FOLDER = System.getProperty(CliProperties.DATA_FOLDER);
 
+    private static final String MAIN_COMMAND = System.getProperty("cli.service.command");

Review Comment:
   Removed the property access from `JBangTestSupport.java` and replaced it with a method to get the property from `CliService`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Rework camel-jbang-it to support camel-launcher [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #21362:
URL: https://github.com/apache/camel/pull/21362#issuecomment-3891461757

   LGTM


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Rework camel-jbang-it to support camel-launcher [camel]

Posted by "mcarlett (via GitHub)" <gi...@apache.org>.
mcarlett commented on code in PR #21362:
URL: https://github.com/apache/camel/pull/21362#discussion_r2782661806


##########
dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/support/JBangTestSupport.java:
##########
@@ -138,7 +140,11 @@ protected String execute(final String command) {
     }
 
     protected String executeBackground(final String command) {
-        return containerService.executeBackground(command);
+        return containerService.executeGenericCommand(MAIN_COMMAND + " " + command + " --background");

Review Comment:
   why you are implementing again what we already have in `containerService.executeBackground()` ? is this a different behaviour?



##########
dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/support/JBangTestSupport.java:
##########
@@ -63,6 +63,8 @@ public abstract class JBangTestSupport {
 
     private static final String DATA_FOLDER = System.getProperty(CliProperties.DATA_FOLDER);
 
+    private static final String MAIN_COMMAND = System.getProperty("cli.service.command");

Review Comment:
   what do you think to implement a `getMainCommand()` method in the `CliService` class so that we have just one place to retrieve the property? you can use so `containerService.getMainCommand()` instead of `MAIN_COMMAND` in all the places



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org