You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "ppalaga (via GitHub)" <gi...@apache.org> on 2023/05/11 15:47:55 UTC

[GitHub] [camel-quarkus] ppalaga commented on a diff in pull request #4889: Be more specific when to use a ConsumerTemplate in extension tests

ppalaga commented on code in PR #4889:
URL: https://github.com/apache/camel-quarkus/pull/4889#discussion_r1191381537


##########
docs/modules/ROOT/pages/contributor-guide/extension-testing.adoc:
##########
@@ -20,7 +20,15 @@ Here are the directories containing integration tests:
 
 The application under test lives under `src/main` directory of the test module.
 It should typically contain one or more Camel routes that utilize the Camel component brought by the extension under test.
-If it helps to avoid additional dependencies, using `@ConsumerTemplate` and/or `@ProducerTemplate` may be favorable over having a full-fledged route.
+
+`ProducerTemplate` may be favorable over having a full-fledged route, e.g. when it helps to avoid additional dependencies
+or where it helps to keep the test application simple.
+
+On the other hand, the use of `ConsumerTemplate` should be assessed carefully.
+In some cases, it may use a different `Consumer` implementation (polling vs. non-polling)
+than what would be used by the given component in a route.
+A test application with `ConsumerTemplate` only may thus miss covering important execution paths.

Review Comment:
   Thanks for resolving my struggle why it sounded so strange, @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.

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

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