jamesnetherton commented on code in PR #3847:
URL: https://github.com/apache/camel-quarkus/pull/3847#discussion_r923015532


##########
extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java:
##########
@@ -81,7 +81,10 @@ public String getVersion() {
     @Override
     protected Registry createRegistry() {
         // Registry creation is done at build time
-        throw new UnsupportedOperationException();
+        throw new UnsupportedOperationException(
+                "In case that the test based on CamelQuarkusTestSupport throws 
this exception, " +
+                        "be aware that re-starting of context is not possible. 
" +
+                        "(See 
https://camel.apache.org/camel-quarkus/2.10.x/user-guide/testing.html)");

Review Comment:
   We need to be a bit careful about linking to docs because 2.10.x is not LTS 
and will get removed at some point.
   
   Personally, I would just throw a plain `UnsupportedOperationException` 
without the message.
   
   We could add some notes into the docs about the registry. E.g if you need to 
bind beans to it, then you can: 
   
   * Use CDI producers
   * Use the Camel `@BindToRegistry` annotation
   * `@Inject` the `CamelContext` into the test and get a handle on the 
registry from it



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

Reply via email to