JiriOndrusek commented on code in PR #3847:
URL: https://github.com/apache/camel-quarkus/pull/3847#discussion_r922072029
##########
docs/modules/ROOT/pages/user-guide/testing.adoc:
##########
@@ -226,3 +226,27 @@ class MyTest {
----
More examples of WireMock usage can be found in the Camel Quarkus integration
test source tree such as
https://github.com/apache/camel-quarkus/tree/main/integration-tests/geocoder[Geocoder].
+
+== `CamelTestSupport` style of testing
+
+If you used plain Camel before, you may know
https://camel.apache.org/components/latest/others/test-junit5.html[CamelTestSupport]
already.
+Unfortunately the Camel variant won't work on Quarkus and so we prepared a
replacement called `CamelQuarkusTestSupport`, which can be used in JVM mode.
+
+There are several limitations:
+
+* Test has to be annotated by `@QuarkusTest` and has to extend
`CamelQuarkusTestSupport`.
+* Quarkus runs tests in a custom classloader which JUnit is not aware of (see
the
https://quarkus.io/guides/getting-started-testing#applying-interceptors-to-tests[documentation]).
If JUnit's callback (i.e.
`org.junit.jupiter.api.extension.BeforeEachCallback`) is used, it may not work
as expected. Use the quarkus callbacks instead (see the
https://quarkus.io/guides/getting-started-testing#enrichment-via-quarkustestcallback[documentation])
or use annotations like `@org.junit.jupiter.api.BeforeEach`.
Review Comment:
I changed text to
```
JUnit Jupiter callbacks (`BeforeEachCallback`, `AfterEachCallback`,
`AfterAllCallback`, `BeforeAllCallback`, `BeforeTestExecutionCallback` and
`AfterTestExecutionCallback`) might not work correctly. See the
https://quarkus.io/guides/getting-started-testing#enrichment-via-quarkustestcallback[documentation].
```
, which should warn the users to be cautious about callbacks.
@ppalaga Do you agree?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]