You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/09/14 13:42:55 UTC

[GitHub] [camel-quarkus] llowinge commented on a change in pull request #1782: Make sure that Telegram tests are not run against mock API by setting…

llowinge commented on a change in pull request #1782:
URL: https://github.com/apache/camel-quarkus/pull/1782#discussion_r487917410



##########
File path: integration-tests/telegram/src/main/java/org/apache/camel/quarkus/component/telegram/it/TelegramRoutes.java
##########
@@ -21,37 +21,86 @@
 import java.io.InputStream;
 import java.util.stream.Stream;
 
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Produces;
+import javax.inject.Named;
+
+import io.quarkus.arc.Unremovable;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.telegram.TelegramComponent;
+import org.apache.camel.quarkus.test.mock.backend.MockBackendUtils;
 import org.apache.camel.support.ResourceHelper;
 import org.apache.camel.util.IOHelper;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
 
+@ApplicationScoped
 public class TelegramRoutes extends RouteBuilder {
 
+    @ConfigProperty(name = "camel.quarkus.start-mock-backend", defaultValue = "true")
+    boolean startMockBackend;

Review comment:
       I'm just thinking if it would be somehow possible to move this parameter into `MockBackendUtils` and there would be the logic with one generic method `logBackendUsed`. Wdyt @jamesnetherton ?




----------------------------------------------------------------
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.

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